From: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxxxxxx>
Then, the code can be shared between kvm events and perf stat
[ Dong Hao <haodong@xxxxxxxxxxxxxxxxxx>: rebase it on acme's git tree ]
Signed-off-by: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Dong Hao <haodong@xxxxxxxxxxxxxxxxxx>
---
tools/perf/Makefile | 1 +
tools/perf/builtin-stat.c | 56 +------------------------------------------
tools/perf/util/stat.c | 57 +++++++++++++++++++++++++++++++++++++++++++++
tools/perf/util/stat.h | 16 ++++++++++++
4 files changed, 76 insertions(+), 54 deletions(-)
create mode 100644 tools/perf/util/stat.c
create mode 100644 tools/perf/util/stat.h