diff options
-rw-r--r-- | tools/perf/builtin-diff.c | 3 | ||||
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 6 | ||||
-rw-r--r-- | tools/perf/ui/gtk/hists.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/hist.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 6 | ||||
-rw-r--r-- | tools/perf/util/hist.h | 2 | ||||
-rw-r--r-- | tools/perf/util/sort.c | 5 |
7 files changed, 14 insertions, 12 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 21ee753211ad..75da965df343 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c | |||
@@ -1033,7 +1033,8 @@ static int hpp__entry_global(struct perf_hpp_fmt *_fmt, struct perf_hpp *hpp, | |||
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | static int hpp__header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 1035 | static int hpp__header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
1036 | struct hists *hists __maybe_unused) | 1036 | struct hists *hists __maybe_unused, |
1037 | int line __maybe_unused) | ||
1037 | { | 1038 | { |
1038 | struct diff_hpp_fmt *dfmt = | 1039 | struct diff_hpp_fmt *dfmt = |
1039 | container_of(fmt, struct diff_hpp_fmt, fmt); | 1040 | container_of(fmt, struct diff_hpp_fmt, fmt); |
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 95f7cf1991fc..303ed62a8f53 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -1523,7 +1523,7 @@ static int hists_browser__scnprintf_headers(struct hist_browser *browser, char * | |||
1523 | if (perf_hpp__should_skip(fmt, hists) || column++ < browser->b.horiz_scroll) | 1523 | if (perf_hpp__should_skip(fmt, hists) || column++ < browser->b.horiz_scroll) |
1524 | continue; | 1524 | continue; |
1525 | 1525 | ||
1526 | ret = fmt->header(fmt, &dummy_hpp, hists); | 1526 | ret = fmt->header(fmt, &dummy_hpp, hists, 0); |
1527 | if (advance_hpp_check(&dummy_hpp, ret)) | 1527 | if (advance_hpp_check(&dummy_hpp, ret)) |
1528 | break; | 1528 | break; |
1529 | 1529 | ||
@@ -1560,7 +1560,7 @@ static int hists_browser__scnprintf_hierarchy_headers(struct hist_browser *brows | |||
1560 | if (column++ < browser->b.horiz_scroll) | 1560 | if (column++ < browser->b.horiz_scroll) |
1561 | continue; | 1561 | continue; |
1562 | 1562 | ||
1563 | ret = fmt->header(fmt, &dummy_hpp, hists); | 1563 | ret = fmt->header(fmt, &dummy_hpp, hists, 0); |
1564 | if (advance_hpp_check(&dummy_hpp, ret)) | 1564 | if (advance_hpp_check(&dummy_hpp, ret)) |
1565 | break; | 1565 | break; |
1566 | 1566 | ||
@@ -1597,7 +1597,7 @@ static int hists_browser__scnprintf_hierarchy_headers(struct hist_browser *brows | |||
1597 | } | 1597 | } |
1598 | first_col = false; | 1598 | first_col = false; |
1599 | 1599 | ||
1600 | ret = fmt->header(fmt, &dummy_hpp, hists); | 1600 | ret = fmt->header(fmt, &dummy_hpp, hists, 0); |
1601 | dummy_hpp.buf[ret] = '\0'; | 1601 | dummy_hpp.buf[ret] = '\0'; |
1602 | 1602 | ||
1603 | start = trim(dummy_hpp.buf); | 1603 | start = trim(dummy_hpp.buf); |
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index c5f3677f6679..79cb5c4d5e2e 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c | |||
@@ -549,7 +549,7 @@ static void perf_gtk__show_hierarchy(GtkWidget *window, struct hists *hists, | |||
549 | strcat(buf, "+"); | 549 | strcat(buf, "+"); |
550 | first_col = false; | 550 | first_col = false; |
551 | 551 | ||
552 | fmt->header(fmt, &hpp, hists); | 552 | fmt->header(fmt, &hpp, hists, 0); |
553 | strcat(buf, ltrim(rtrim(hpp.buf))); | 553 | strcat(buf, ltrim(rtrim(hpp.buf))); |
554 | } | 554 | } |
555 | } | 555 | } |
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index be7a17fec889..30457c65980c 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c | |||
@@ -230,7 +230,7 @@ static int hpp__width_fn(struct perf_hpp_fmt *fmt, | |||
230 | } | 230 | } |
231 | 231 | ||
232 | static int hpp__header_fn(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 232 | static int hpp__header_fn(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
233 | struct hists *hists) | 233 | struct hists *hists, int line __maybe_unused) |
234 | { | 234 | { |
235 | int len = hpp__width_fn(fmt, hpp, hists); | 235 | int len = hpp__width_fn(fmt, hpp, hists); |
236 | return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name); | 236 | return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name); |
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index f04a63112079..91b8e10cabd5 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -549,7 +549,7 @@ static int print_hierarchy_header(struct hists *hists, struct perf_hpp *hpp, | |||
549 | struct perf_hpp_list_node, list); | 549 | struct perf_hpp_list_node, list); |
550 | 550 | ||
551 | perf_hpp_list__for_each_format(&fmt_node->hpp, fmt) { | 551 | perf_hpp_list__for_each_format(&fmt_node->hpp, fmt) { |
552 | fmt->header(fmt, hpp, hists); | 552 | fmt->header(fmt, hpp, hists, 0); |
553 | fprintf(fp, "%s%s", hpp->buf, sep ?: " "); | 553 | fprintf(fp, "%s%s", hpp->buf, sep ?: " "); |
554 | } | 554 | } |
555 | 555 | ||
@@ -569,7 +569,7 @@ static int print_hierarchy_header(struct hists *hists, struct perf_hpp *hpp, | |||
569 | header_width += fprintf(fp, "+"); | 569 | header_width += fprintf(fp, "+"); |
570 | first_col = false; | 570 | first_col = false; |
571 | 571 | ||
572 | fmt->header(fmt, hpp, hists); | 572 | fmt->header(fmt, hpp, hists, 0); |
573 | 573 | ||
574 | header_width += fprintf(fp, "%s", trim(hpp->buf)); | 574 | header_width += fprintf(fp, "%s", trim(hpp->buf)); |
575 | } | 575 | } |
@@ -658,7 +658,7 @@ hists__fprintf_standard_headers(struct hists *hists, | |||
658 | else | 658 | else |
659 | first = false; | 659 | first = false; |
660 | 660 | ||
661 | fmt->header(fmt, hpp, hists); | 661 | fmt->header(fmt, hpp, hists, 0); |
662 | fprintf(fp, "%s", hpp->buf); | 662 | fprintf(fp, "%s", hpp->buf); |
663 | } | 663 | } |
664 | 664 | ||
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 8cc5d33d2405..71a44c1c44de 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -230,7 +230,7 @@ struct perf_hpp { | |||
230 | struct perf_hpp_fmt { | 230 | struct perf_hpp_fmt { |
231 | const char *name; | 231 | const char *name; |
232 | int (*header)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 232 | int (*header)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
233 | struct hists *hists); | 233 | struct hists *hists, int line); |
234 | int (*width)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 234 | int (*width)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
235 | struct hists *hists); | 235 | struct hists *hists); |
236 | int (*color)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 236 | int (*color)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 3d3cb8392c86..a556de751018 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -1492,7 +1492,7 @@ void perf_hpp__reset_sort_width(struct perf_hpp_fmt *fmt, struct hists *hists) | |||
1492 | } | 1492 | } |
1493 | 1493 | ||
1494 | static int __sort__hpp_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 1494 | static int __sort__hpp_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
1495 | struct hists *hists) | 1495 | struct hists *hists, int line __maybe_unused) |
1496 | { | 1496 | { |
1497 | struct hpp_sort_entry *hse; | 1497 | struct hpp_sort_entry *hse; |
1498 | size_t len = fmt->user_len; | 1498 | size_t len = fmt->user_len; |
@@ -1797,7 +1797,8 @@ static void update_dynamic_len(struct hpp_dynamic_entry *hde, | |||
1797 | } | 1797 | } |
1798 | 1798 | ||
1799 | static int __sort__hde_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, | 1799 | static int __sort__hde_header(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, |
1800 | struct hists *hists __maybe_unused) | 1800 | struct hists *hists __maybe_unused, |
1801 | int line __maybe_unused) | ||
1801 | { | 1802 | { |
1802 | struct hpp_dynamic_entry *hde; | 1803 | struct hpp_dynamic_entry *hde; |
1803 | size_t len = fmt->user_len; | 1804 | size_t len = fmt->user_len; |