> > @@ -1164,6 +1164,9 @@ int cmd_diff(int argc, const char **argv, const > char *prefix __maybe_unused) > > if (setup_sorting() < 0) > > usage_with_options(diff_usage, options); > > > > + if (sort__has_sym_name) > > + tool.mmap2 = perf_event__process_mmap2; > > why is the mmap2 callback set only for sort__has_sym_name? > Shouldn't we use/define it directly in the tool's definition? >
If we define it in tools definition, perf diff will display the differential profile between functions (Not previous userspace IPs). For same binary, IPs are same. So I think it's better to compare between IPs. For different binaries, IPs change. But most of the function names are same for most binary update case. So we'd better compare between functions. I want to keep both IP and function compare. So only new sort key "symble_name" set mmap2 which implies function compare. If we only need to compare between IPs, we don't need to set mmap2. Thanks, Kan > jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/