return timer == NULL;
}
-static int hists_browser__scnprintf_title(struct hist_browser *browser, char *bf, size_t size)
+int __hists__scnprintf_title(struct hists *hists, char *bf, size_t size, bool show_freq)
{
- struct hist_browser_timer *hbt = browser->hbt;
- struct hists *hists = browser->hists;
char unit;
int printed;
const struct dso *dso = hists->dso_filter;
strstr(ev_name, "call-graph=no"))
enable_ref = true;
- if (!is_report_browser(hbt))
+ if (show_freq)
scnprintf(sample_freq_str, sizeof(sample_freq_str), " %d Hz,", evsel->attr.sample_freq);
nr_samples = convert_unit(nr_samples, &unit);
if (socket_id > -1)
printed += scnprintf(bf + printed, size - printed,
", Processor Socket: %d", socket_id);
+
+ return printed;
+}
+
+static int hists_browser__scnprintf_title(struct hist_browser *browser, char *bf, size_t size)
+{
+ struct hist_browser_timer *hbt = browser->hbt;
+ int printed = __hists__scnprintf_title(browser->hists, bf, size, !is_report_browser(hbt));
+
if (!is_report_browser(hbt)) {
struct perf_top *top = hbt->arg;
int __hist_entry__snprintf(struct hist_entry *he, struct perf_hpp *hpp,
struct perf_hpp_list *hpp_list);
int hists__fprintf_headers(struct hists *hists, FILE *fp);
+int __hists__scnprintf_title(struct hists *hists, char *bf, size_t size, bool show_freq);
+
+static inline int hists__scnprintf_title(struct hists *hists, char *bf, size_t size)
+{
+ return __hists__scnprintf_title(hists, bf, size, true);
+}
#endif /* __PERF_HIST_H */