perf diff: Use perf_session__fprintf_hists just like 'perf record'
[deliverable/linux.git] / tools / perf / util / sort.c
index cff1c316fa910648cc53328494c03a8b53809ea3..cb0f327de9e86f73f08c63cce689f63f5fb137fc 100644 (file)
@@ -303,3 +303,14 @@ void setup_sorting(const char * const usagestr[], const struct option *opts)
 
        free(str);
 }
+
+void sort_entry__setup_elide(struct sort_entry *self, struct strlist *list,
+                            const char *list_name, FILE *fp)
+{
+       if (list && strlist__nr_entries(list) == 1) {
+               if (fp != NULL)
+                       fprintf(fp, "# %s: %s\n", list_name,
+                               strlist__entry(list, 0)->s);
+               self->elide = true;
+       }
+}
This page took 0.036084 seconds and 5 git commands to generate.