Mesa (master): svga: add guest statistic gathering interface
Module: Mesa Branch: master Commit: 0035f7f13650680df1f09fc86c0c1c8c0b39f010 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0035f7f13650680df1f09fc86c0c1c8c0b39f010 Author: Charmaine Lee Date: Fri Aug 26 07:58:59 2016 -0600 svga: add guest statistic gathering interface This file was supposed to be added with the previous "svga: add guest statistic gathering interface" patch but went MIA for some reason. Reviewed-by: Brian Paul --- src/gallium/drivers/svga/svga_mksstats.h | 49 1 file changed, 49 insertions(+) diff --git a/src/gallium/drivers/svga/svga_mksstats.h b/src/gallium/drivers/svga/svga_mksstats.h new file mode 100644 index 000..a1c1573 --- /dev/null +++ b/src/gallium/drivers/svga/svga_mksstats.h @@ -0,0 +1,49 @@ +/** + * Copyright 2016 VMware, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **/ + +#ifndef _SVGA_MKSSTATS_H +#define _SVGA_MKSSTATS_H + +#include "svga_winsys.h" + +#ifdef VMX86_STATS +#define SVGA_STATS_COUNT_INC(_sws, _stat)\ + _sws->stats_inc(_stat); + +#define SVGA_STATS_TIME_PUSH(_sws, _stat)\ + struct svga_winsys_stats_timeframe timeFrame; \ + _sws->stats_time_push(_stat, &timeFrame); + +#define SVGA_STATS_TIME_POP(_sws)\ + _sws->stats_time_pop(); + +#else + +#define SVGA_STATS_COUNT_INC(_sws, _stat) +#define SVGA_STATS_TIME_PUSH(_sws, _stat) +#define SVGA_STATS_TIME_POP(_sws) + +#endif +#endif /* _SVGA_MKSSTATS_H */ ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit
Mesa (master): svga: add guest statistic gathering interface
Module: Mesa Branch: master Commit: 2e1cfcc431471c68ba79c9323716bed7da79c909 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2e1cfcc431471c68ba79c9323716bed7da79c909 Author: Charmaine Lee Date: Fri Aug 19 08:49:17 2016 -0600 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 --- src/gallium/drivers/svga/svga_context.c| 7 + src/gallium/drivers/svga/svga_context.h| 5 + src/gallium/drivers/svga/svga_draw.c | 16 ++- src/gallium/drivers/svga/svga_draw_arrays.c| 22 +-- src/gallium/drivers/svga/svga_draw_elements.c | 13 +- src/gallium/drivers/svga/svga_pipe_blend.c | 2 + src/gallium/drivers/svga/svga_pipe_depthstencil.c | 3 + src/gallium/drivers/svga/svga_pipe_draw.c | 42 -- src/gallium/drivers/svga/svga_pipe_fs.c| 3 + src/gallium/drivers/svga/svga_pipe_gs.c| 3 + src/gallium/drivers/svga/svga_pipe_rasterizer.c| 2 + src/gallium/drivers/svga/svga_pipe_sampler.c | 11 +- src/gallium/drivers/svga/svga_pipe_vertex.c| 2 + src/gallium/drivers/svga/svga_pipe_vs.c| 3 + src/gallium/drivers/svga/svga_resource_buffer.c| 19 ++- .../drivers/svga/svga_resource_buffer_upload.c | 4 + src/gallium/drivers/svga/svga_resource_texture.c | 37 +++-- src/gallium/drivers/svga/svga_screen.c | 19 ++- src/gallium/drivers/svga/svga_shader.c | 11 +- src/gallium/drivers/svga/svga_state.c | 8 +- src/gallium/drivers/svga/svga_state_fs.c | 12 +- src/gallium/drivers/svga/svga_state_gs.c | 12 +- src/gallium/drivers/svga/svga_state_vs.c | 10 +- src/gallium/drivers/svga/svga_surface.c| 46 ++- src/gallium/drivers/svga/svga_swtnl_backend.c | 35 - src/gallium/drivers/svga/svga_swtnl_draw.c | 3 + src/gallium/drivers/svga/svga_swtnl_state.c| 13 +- src/gallium/drivers/svga/svga_tgsi.c | 12 +- src/gallium/drivers/svga/svga_tgsi_vgpu10.c| 5 +- src/gallium/drivers/svga/svga_winsys.h | 153 + src/gallium/winsys/svga/drm/vmw_screen_svga.c | 20 +++ 31 files changed, 468 insertions(+), 85 deletions(-) Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=2e1cfcc431471c68ba79c9323716bed7da79c909 ___ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit