diff options
author | Charmaine Lee <[email protected]> | 2016-08-19 08:49:17 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-08-26 06:19:51 -0600 |
commit | 2e1cfcc431471c68ba79c9323716bed7da79c909 (patch) | |
tree | 79fbbe6fb5da05d1f6596eb4944bc94ab832ff6f /src/gallium/drivers/svga/svga_context.c | |
parent | 479199180871432030d3eebc2822bd7cb3dc6fd6 (diff) |
svga: add guest statistic gathering interface
With this patch, guest statistic gathering interface is added to
svga winsys interface that can be used to gather svga driver
statistic. The winsys module can then share the statistic info with
the VMX host via the mksstats interface.
The statistic enums used in the svga driver are defined in
svga_stats_count and svga_stats_time in svga_winsys.h
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_context.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 52956fab297..cbc312edbde 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -307,6 +307,8 @@ void svga_context_flush( struct svga_context *svga, struct pipe_fence_handle *fence = NULL; uint64_t t0; + SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_CONTEXTFLUSH); + svga->curr.nr_fbs = 0; /* Ensure that texture dma uploads are processed @@ -355,6 +357,8 @@ void svga_context_flush( struct svga_context *svga, svgascreen->sws->fence_reference(svgascreen->sws, pfence, fence); svgascreen->sws->fence_reference(svgascreen->sws, &fence, NULL); + + SVGA_STATS_TIME_POP(svga_sws(svga)); } @@ -413,6 +417,8 @@ void svga_surfaces_flush(struct svga_context *svga) struct svga_screen *svgascreen = svga_screen(svga->pipe.screen); unsigned i; + SVGA_STATS_TIME_PUSH(svga_sws(svga), SVGA_STATS_TIME_SURFACEFLUSH); + /* Emit buffered drawing commands. */ svga_hwtnl_flush_retry( svga ); @@ -427,6 +433,7 @@ void svga_surfaces_flush(struct svga_context *svga) if (svga->curr.framebuffer.zsbuf) svga_propagate_surface(svga, svga->curr.framebuffer.zsbuf); + SVGA_STATS_TIME_POP(svga_sws(svga)); } |