summaryrefslogtreecommitdiff
path: root/tools/perf/util/pstack.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-05-06 04:42:12 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-06 04:42:12 +0200
commit1836ac856e4fb446e48afa4f8cae897d4856b06c (patch)
tree1b5da329b15a09e13189801c82266fb6805a90af /tools/perf/util/pstack.c
parent5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff)
parent3698dab1c849c7e1cd440df4fca24baa1973d53b (diff)
Merge tag 'perf-core-for-mingo-3' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Improve --filter support for 'perf probe', allowing using its arguments on other commands, as --add, --del, etc (Masami Hiramatsu) - Show warning when running 'perf kmem stat' on a unsuitable perf.data file, i.e. one with events that are not the ones required for the stat variant used (Namhyung Kim). Infrastructure changes: - Auxtrace support patches, paving the way to support Intel PT and BTS (Adrian Hunter) - hists browser (top, report) refactorings (Namhyung Kim) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/pstack.c')
-rw-r--r--tools/perf/util/pstack.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/pstack.c b/tools/perf/util/pstack.c
index a126e6cc6e73..b234a6e3d0d4 100644
--- a/tools/perf/util/pstack.c
+++ b/tools/perf/util/pstack.c
@@ -74,3 +74,10 @@ void *pstack__pop(struct pstack *pstack)
pstack->entries[pstack->top] = NULL;
return ret;
}
+
+void *pstack__peek(struct pstack *pstack)
+{
+ if (pstack->top == 0)
+ return NULL;
+ return pstack->entries[pstack->top - 1];
+}