mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
perf hists: Clarify callchain disabling when available
We want to allow having mixed events with/without callchains, not using a global flag to show callchains, but allowing supressing callchains when they are present. So invert the logic of the last parameter to hists__fprint() to that effect. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-ohqyisr6qge79qa95ojslptx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
06dc5bf21f
commit
e9de7e2f7e
@ -2193,7 +2193,7 @@ static void print_cacheline(struct c2c_hists *c2c_hists,
|
||||
fprintf(out, "%s\n", bf);
|
||||
fprintf(out, " -------------------------------------------------------------\n");
|
||||
|
||||
hists__fprintf(&c2c_hists->hists, false, 0, 0, 0, out, true);
|
||||
hists__fprintf(&c2c_hists->hists, false, 0, 0, 0, out, false);
|
||||
}
|
||||
|
||||
static void print_pareto(FILE *out)
|
||||
@ -2268,7 +2268,7 @@ static void perf_c2c__hists_fprintf(FILE *out, struct perf_session *session)
|
||||
fprintf(out, "=================================================\n");
|
||||
fprintf(out, "#\n");
|
||||
|
||||
hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, false);
|
||||
hists__fprintf(&c2c.hists.hists, true, 0, 0, 0, stdout, true);
|
||||
|
||||
fprintf(out, "\n");
|
||||
fprintf(out, "=================================================\n");
|
||||
|
@ -696,7 +696,7 @@ static void hists__process(struct hists *hists)
|
||||
hists__output_resort(hists, NULL);
|
||||
|
||||
hists__fprintf(hists, !quiet, 0, 0, 0, stdout,
|
||||
symbol_conf.use_callchain);
|
||||
!symbol_conf.use_callchain);
|
||||
}
|
||||
|
||||
static void data__fprintf(void)
|
||||
|
@ -478,8 +478,8 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
|
||||
|
||||
hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
|
||||
hists__fprintf(hists, !quiet, 0, 0, rep->min_percent, stdout,
|
||||
symbol_conf.use_callchain ||
|
||||
symbol_conf.show_branchflag_count);
|
||||
!(symbol_conf.use_callchain ||
|
||||
symbol_conf.show_branchflag_count));
|
||||
fprintf(stdout, "\n\n");
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ static void perf_top__print_sym_table(struct perf_top *top)
|
||||
hists__output_recalc_col_len(hists, top->print_entries - printed);
|
||||
putchar('\n');
|
||||
hists__fprintf(hists, false, top->print_entries - printed, win_width,
|
||||
top->min_percent, stdout, symbol_conf.use_callchain);
|
||||
top->min_percent, stdout, !symbol_conf.use_callchain);
|
||||
}
|
||||
|
||||
static void prompt_integer(int *target, const char *msg)
|
||||
|
@ -529,7 +529,7 @@ out:
|
||||
|
||||
static int hist_entry__fprintf(struct hist_entry *he, size_t size,
|
||||
char *bf, size_t bfsz, FILE *fp,
|
||||
bool use_callchain)
|
||||
bool ignore_callchains)
|
||||
{
|
||||
int ret;
|
||||
int callchain_ret = 0;
|
||||
@ -550,7 +550,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size,
|
||||
|
||||
ret = fprintf(fp, "%s\n", bf);
|
||||
|
||||
if (hist_entry__has_callchains(he) && use_callchain)
|
||||
if (hist_entry__has_callchains(he) && !ignore_callchains)
|
||||
callchain_ret = hist_entry_callchain__fprintf(he, total_period,
|
||||
0, fp);
|
||||
|
||||
@ -755,7 +755,7 @@ int hists__fprintf_headers(struct hists *hists, FILE *fp)
|
||||
|
||||
size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
int max_cols, float min_pcnt, FILE *fp,
|
||||
bool use_callchain)
|
||||
bool ignore_callchains)
|
||||
{
|
||||
struct rb_node *nd;
|
||||
size_t ret = 0;
|
||||
@ -799,7 +799,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
if (percent < min_pcnt)
|
||||
continue;
|
||||
|
||||
ret += hist_entry__fprintf(h, max_cols, line, linesz, fp, use_callchain);
|
||||
ret += hist_entry__fprintf(h, max_cols, line, linesz, fp, ignore_callchains);
|
||||
|
||||
if (max_rows && ++nr_rows >= max_rows)
|
||||
break;
|
||||
|
@ -181,7 +181,7 @@ size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);
|
||||
|
||||
size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
|
||||
int max_cols, float min_pcnt, FILE *fp,
|
||||
bool use_callchain);
|
||||
bool ignore_callchains);
|
||||
size_t perf_evlist__fprintf_nr_events(struct perf_evlist *evlist, FILE *fp);
|
||||
|
||||
void hists__filter_by_dso(struct hists *hists);
|
||||
|
Loading…
Reference in New Issue
Block a user