X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=tools%2Fperf%2Fbuiltin-diff.c;h=36ccc2b8827fdd239b657e79b396ae013c318462;hb=f9a03ae123c92c1f45cd2ca88d0f6edd787be78c;hp=0b180a885ba369cc79f3c47e888fa91ed782c09b;hpb=985f2c87a7109a42cac93f56ea595353d53a1746;p=cascardo%2Flinux.git diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 0b180a885ba3..36ccc2b8827f 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -311,11 +311,11 @@ static int formula_fprintf(struct hist_entry *he, struct hist_entry *pair, } static int hists__add_entry(struct hists *hists, - struct addr_location *al, u64 period, - u64 weight, u64 transaction) + struct addr_location *al, + struct perf_sample *sample) { - if (__hists__add_entry(hists, al, NULL, NULL, NULL, period, weight, - transaction, true) != NULL) + if (__hists__add_entry(hists, al, NULL, NULL, NULL, + sample, true) != NULL) return 0; return -ENOMEM; } @@ -336,8 +336,7 @@ static int diff__process_sample_event(struct perf_tool *tool __maybe_unused, return -1; } - if (hists__add_entry(hists, &al, sample->period, - sample->weight, sample->transaction)) { + if (hists__add_entry(hists, &al, sample)) { pr_warning("problem incrementing symbol period, skipping event\n"); goto out_put; } @@ -1208,7 +1207,7 @@ static int ui_init(void) BUG_ON(1); } - list_add(&fmt->sort_list, &perf_hpp__sort_list); + perf_hpp__register_sort_field(fmt); return 0; } @@ -1280,7 +1279,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) sort__mode = SORT_MODE__DIFF; - if (setup_sorting() < 0) + if (setup_sorting(NULL) < 0) usage_with_options(diff_usage, options); setup_pager();