On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote:
SNIP
+const char *branch_type_name(int type)looks like we should add util/branch.c with above functions
+{
+ const char *branch_names[PERF_BR_MAX] = {
+ "N/A",
+ "JCC",
+ "JMP",
+ "IND_JMP",
+ "CALL",
+ "IND_CALL",
+ "RET",
+ "SYSCALL",
+ "SYSRET",
+ "IRQ",
+ "INT",
+ "IRET",
+ "FAR_BRANCH",
+ };
+
+ if ((type >= 0) && (type < PERF_BR_MAX))
+ return branch_names[type];
+
+ return NULL;
and merge it with util/parse-branch-options.c
we create new file even for less code ;-)
thanks,
jirka