Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1235746 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2015-09-30 06:50 +0200 |
| Last post | 2015-10-03 09:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] perf report: Fix a bug on "--call-graph none" option Namhyung Kim <namhyung@kernel.org> - 2015-09-30 06:50 +0200
Re: [PATCH] perf report: Fix a bug on "--call-graph none" option Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:10 +0200
[tip:perf/core] perf report: Fix a bug on "--call-graph none" option tip-bot for Namhyung Kim <tipbot@zytor.com> - 2015-10-03 09:50 +0200
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2015-09-30 06:50 +0200 |
| Subject | [PATCH] perf report: Fix a bug on "--call-graph none" option |
| Message-ID | <qehv4-2US-3@gated-at.bofh.it> |
The patch f9db0d0f1b2c ("perf callchain: Allow disabling call graphs
per event") added an ability to enable/disable callchain recording per
event. But it had a problem when the enablement setting is changed at
'perf report' time using -g/--call-graph option.
For example, the following scenario will get a segfault.
$ perf record -ag sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.500 MB perf.data (2555 samples) ]
$ perf report -g none
perf: Segmentation fault
-------- backtrace --------
perf[0x53a98a]
/usr/lib/libc.so.6(+0x335af)[0x7f4e91df95af]
This is because callchain_param.sort() callback was not set but it
tried to call the function as it had the PERF_SAMPLE_CALLCHAIN bit.
Cc: Kan Liang <kan.liang@intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/util/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index b3567a25f0c4..99b8e14ce010 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1149,7 +1149,7 @@ void hists__output_resort(struct hists *hists, struct ui_progress *prog)
struct perf_evsel *evsel = hists_to_evsel(hists);
bool use_callchain;
- if (evsel && !symbol_conf.show_ref_callgraph)
+ if (evsel && symbol_conf.use_callchain && !symbol_conf.show_ref_callgraph)
use_callchain = evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN;
else
use_callchain = symbol_conf.use_callchain;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2015-10-01 00:10 +0200 |
| Message-ID | <qexJw-1cv-17@gated-at.bofh.it> |
| In reply to | #1235746 |
Em Wed, Sep 30, 2015 at 01:34:00PM +0900, Namhyung Kim escreveu:
> The patch f9db0d0f1b2c ("perf callchain: Allow disabling call graphs
> per event") added an ability to enable/disable callchain recording per
> event. But it had a problem when the enablement setting is changed at
> 'perf report' time using -g/--call-graph option.
>
> For example, the following scenario will get a segfault.
>
> $ perf record -ag sleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.500 MB perf.data (2555 samples) ]
>
> $ perf report -g none
> perf: Segmentation fault
> -------- backtrace --------
> perf[0x53a98a]
> /usr/lib/libc.so.6(+0x335af)[0x7f4e91df95af]
>
> This is because callchain_param.sort() callback was not set but it
> tried to call the function as it had the PERF_SAMPLE_CALLCHAIN bit.
Thanks, reproduced, tested the fix, applied.
- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Namhyung Kim <tipbot@zytor.com> |
|---|---|
| Date | 2015-10-03 09:50 +0200 |
| Subject | [tip:perf/core] perf report: Fix a bug on "--call-graph none" option |
| Message-ID | <qfpJU-3Pm-13@gated-at.bofh.it> |
| In reply to | #1235746 |
Commit-ID: 208e7607459477432d3df52c32d4b961a96d4a94
Gitweb: http://git.kernel.org/tip/208e7607459477432d3df52c32d4b961a96d4a94
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Wed, 30 Sep 2015 13:34:00 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 1 Oct 2015 09:54:33 -0300
perf report: Fix a bug on "--call-graph none" option
The patch f9db0d0f1b2c ("perf callchain: Allow disabling call graphs
per event") added an ability to enable/disable callchain recording per
event. But it had a problem when the enablement setting is changed at
'perf report' time using -g/--call-graph option.
For example, the following scenario will get a segfault.
$ perf record -ag sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.500 MB perf.data (2555 samples) ]
$ perf report -g none
perf: Segmentation fault
-------- backtrace --------
perf[0x53a98a]
/usr/lib/libc.so.6(+0x335af)[0x7f4e91df95af]
This is because callchain_param.sort() callback was not set but it
tried to call the function as it had the PERF_SAMPLE_CALLCHAIN bit.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: f9db0d0f1b2c ("perf callchain: Allow disabling call graphs per event")
Link: http://lkml.kernel.org/r/1443587640-24242-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 0cad9e0..c346b33 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1151,7 +1151,7 @@ void hists__output_resort(struct hists *hists, struct ui_progress *prog)
struct perf_evsel *evsel = hists_to_evsel(hists);
bool use_callchain;
- if (evsel && !symbol_conf.show_ref_callgraph)
+ if (evsel && symbol_conf.use_callchain && !symbol_conf.show_ref_callgraph)
use_callchain = evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN;
else
use_callchain = symbol_conf.use_callchain;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web