mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
perf trace: Make --event honour --min-stack too
Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Milian Wolff <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
1 parent
e557b674a9
commit
7ad3561595
1 file changed
+16
-5
@@ -2126,6 +2126,17 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
|
||||
union perf_event *event __maybe_unused,
|
||||
struct perf_sample *sample)
|
||||
{
|
||||
int callchain_ret = 0;
|
||||
|
||||
if (sample->callchain) {
|
||||
callchain_ret = trace__resolve_callchain(trace, evsel, sample, &callchain_cursor);
|
||||
if (callchain_ret == 0) {
|
||||
if (callchain_cursor.nr < trace->min_stack)
|
||||
goto out;
|
||||
callchain_ret = 1;
|
||||
}
|
||||
}
|
||||
|
||||
trace__printf_interrupted_entry(trace, sample);
|
||||
trace__fprintf_tstamp(trace, sample->time, trace->output);
|
||||
|
||||
@@ -2144,11 +2155,11 @@ static int trace__event_handler(struct trace *trace, struct perf_evsel *evsel,
|
||||
|
||||
fprintf(trace->output, ")\n");
|
||||
|
||||
if (sample->callchain) {
|
||||
if (trace__resolve_callchain(trace, evsel, sample, &callchain_cursor) == 0)
|
||||
trace__fprintf_callchain(trace, sample);
|
||||
}
|
||||
|
||||
if (callchain_ret > 0)
|
||||
trace__fprintf_callchain(trace, sample);
|
||||
else if (callchain_ret < 0)
|
||||
pr_err("Problem processing %s callchain, skipping...\n", perf_evsel__name(evsel));
|
||||
out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user