1b8e80941Smrg/********************************************************** 2b8e80941Smrg * Copyright 2016 VMware, Inc. All rights reserved. 3b8e80941Smrg * 4b8e80941Smrg * Permission is hereby granted, free of charge, to any person 5b8e80941Smrg * obtaining a copy of this software and associated documentation 6b8e80941Smrg * files (the "Software"), to deal in the Software without 7b8e80941Smrg * restriction, including without limitation the rights to use, copy, 8b8e80941Smrg * modify, merge, publish, distribute, sublicense, and/or sell copies 9b8e80941Smrg * of the Software, and to permit persons to whom the Software is 10b8e80941Smrg * furnished to do so, subject to the following conditions: 11b8e80941Smrg * 12b8e80941Smrg * The above copyright notice and this permission notice shall be 13b8e80941Smrg * included in all copies or substantial portions of the Software. 14b8e80941Smrg * 15b8e80941Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16b8e80941Smrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17b8e80941Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18b8e80941Smrg * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 19b8e80941Smrg * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20b8e80941Smrg * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21b8e80941Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22b8e80941Smrg * SOFTWARE. 23b8e80941Smrg * 24b8e80941Smrg **********************************************************/ 25b8e80941Smrg 26b8e80941Smrg#ifndef _SVGA_MKSSTATS_H 27b8e80941Smrg#define _SVGA_MKSSTATS_H 28b8e80941Smrg 29b8e80941Smrg#include "svga_winsys.h" 30b8e80941Smrg 31b8e80941Smrg#ifdef VMX86_STATS 32b8e80941Smrg#define SVGA_STATS_COUNT_INC(_sws, _stat) \ 33b8e80941Smrg _sws->stats_inc(_stat); 34b8e80941Smrg 35b8e80941Smrg#define SVGA_STATS_TIME_PUSH(_sws, _stat) \ 36b8e80941Smrg struct svga_winsys_stats_timeframe timeFrame; \ 37b8e80941Smrg _sws->stats_time_push(_stat, &timeFrame); 38b8e80941Smrg 39b8e80941Smrg#define SVGA_STATS_TIME_POP(_sws) \ 40b8e80941Smrg _sws->stats_time_pop(); 41b8e80941Smrg 42b8e80941Smrg#else 43b8e80941Smrg 44b8e80941Smrg#define SVGA_STATS_COUNT_INC(_sws, _stat) 45b8e80941Smrg#define SVGA_STATS_TIME_PUSH(_sws, _stat) 46b8e80941Smrg#define SVGA_STATS_TIME_POP(_sws) 47b8e80941Smrg 48b8e80941Smrg#endif 49b8e80941Smrg#endif /* _SVGA_MKSSTATS_H */ 50