Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335451
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v6 08/25] perf report: Check error during report__collapse_hists() |
| Date | 2016-02-16 15:20 +0100 |
| Message-ID | <r2ODW-vy-65@gated-at.bofh.it> (permalink) |
| References | <r2ODT-vy-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If it returns an error, warn user and bail out instead of silently
ignoring.
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-report.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 1eab50ac1ef6..760e886ca9d9 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -469,10 +469,11 @@ static int report__browse_hists(struct report *rep)
return ret;
}
-static void report__collapse_hists(struct report *rep)
+static int report__collapse_hists(struct report *rep)
{
struct ui_progress prog;
struct perf_evsel *pos;
+ int ret = 0;
ui_progress__init(&prog, rep->nr_entries, "Merging related events...");
@@ -484,7 +485,9 @@ static void report__collapse_hists(struct report *rep)
hists->socket_filter = rep->socket_filter;
- hists__collapse_resort(hists, &prog);
+ ret = hists__collapse_resort(hists, &prog);
+ if (ret < 0)
+ break;
/* Non-group events are considered as leader */
if (symbol_conf.event_group &&
@@ -497,6 +500,7 @@ static void report__collapse_hists(struct report *rep)
}
ui_progress__finish();
+ return ret;
}
static void report__output_resort(struct report *rep)
@@ -564,7 +568,11 @@ static int __cmd_report(struct report *rep)
}
}
- report__collapse_hists(rep);
+ ret = report__collapse_hists(rep);
+ if (ret) {
+ ui__error("failed to process hist entry\n");
+ return ret;
+ }
if (session_done())
return 0;
--
2.7.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHSET 00/25] perf tools: Add support for hierachy view (v6) Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 23/25] perf report: Add --hierarchy option Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 24/25] perf hists: Support decaying in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 14/25] perf hists: Resort after filtering hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 05/25] perf callchain: Check return value of split_add_child() Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[tip:perf/core] perf callchain: Check return value of split_add_child() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-20 12:50 +0100
[PATCH v6 13/25] perf hists: Support filtering in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 04/25] perf callchain: Add enum match_result for match_chain() Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[tip:perf/core] perf callchain: Add enum match_result for match_chain() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-20 12:50 +0100
[PATCH v6 21/25] perf hists browser: Align column header in hierarchy mode Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 03/25] perf callchain: Check return value of fill_node() Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[tip:perf/core] perf callchain: Check return value of fill_node() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-20 12:50 +0100
[PATCH v6 02/25] perf callchain: Check return value of add_child() Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[tip:perf/core] perf callchain: Check return value of add_child() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-20 12:50 +0100
[PATCH v6 25/25] perf top: Add --hierarchy option Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
Re: [PATCH v6 25/25] perf top: Add --hierarchy option Jiri Olsa <jolsa@redhat.com> - 2016-02-21 00:20 +0100
Re: [PATCH v6 25/25] perf top: Add --hierarchy option Namhyung Kim <namhyung@kernel.org> - 2016-02-21 19:20 +0100
[PATCH v6 16/25] perf ui/stdio: Implement hierarchy output mode Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
Re: [PATCH v6 16/25] perf ui/stdio: Implement hierarchy output mode Jiri Olsa <jolsa@redhat.com> - 2016-02-21 00:20 +0100
Re: [PATCH v6 16/25] perf ui/stdio: Implement hierarchy output mode Namhyung Kim <namhyung@kernel.org> - 2016-02-21 19:10 +0100
[PATCH v6 09/25] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
Re: [PATCH v6 09/25] perf hists: Basic support of hierarchical report view Jiri Olsa <jolsa@redhat.com> - 2016-02-21 00:20 +0100
Re: [PATCH v6 09/25] perf hists: Basic support of hierarchical report view Namhyung Kim <namhyung@kernel.org> - 2016-02-21 21:00 +0100
[PATCH v6 20/25] perf hists browser: Implement hierarchy output Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
Re: [PATCH v6 20/25] perf hists browser: Implement hierarchy output Jiri Olsa <jolsa@redhat.com> - 2016-02-21 00:20 +0100
[PATCH v6 19/25] perf hists browser: Support collapsing/expanding whole entries in hierarchy Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[PATCH v6 08/25] perf report: Check error during report__collapse_hists() Namhyung Kim <namhyung@kernel.org> - 2016-02-16 15:20 +0100
[tip:perf/core] perf report: Check error during report__collapse_hists() tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-20 12:50 +0100
csiph-web