Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1463205
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 02/11] perf tools mem: Fix -t store option for record command |
| Date | 2016-08-16 00:10 +0200 |
| Message-ID | <s6yf0-327-23@gated-at.bofh.it> (permalink) |
| References | <s6yeZ-327-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jiri Olsa <jolsa@kernel.org>
Michael reported 'perf mem -t store record' being broken. The reason is
latest rework of this area:
commit acbe613e0c03 ("perf tools: Add monitored events array")
We don't mark perf_mem_events store record when -t store option is
specified.
Committer notes:
Before:
# perf mem -t store record usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.020 MB perf.data (7 samples) ]
# perf evlist
cycles:ppp
#
After:
# perf mem -t store record usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.020 MB perf.data (7 samples) ]
# perf evlist
cpu/mem-stores/P
#
Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: acbe613e0c03 ("perf tools: Add monitored events array")
Link: http://lkml.kernel.org/r/1470905457-18311-1-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-mem.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index d608a2c9e48c..d1ce29be560e 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -88,6 +88,9 @@ static int __cmd_record(int argc, const char **argv, struct perf_mem *mem)
if (mem->operation & MEM_OPERATION_LOAD)
perf_mem_events[PERF_MEM_EVENTS__LOAD].record = true;
+ if (mem->operation & MEM_OPERATION_STORE)
+ perf_mem_events[PERF_MEM_EVENTS__STORE].record = true;
+
if (perf_mem_events[PERF_MEM_EVENTS__LOAD].record)
rec_argv[i++] = "-W";
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/11] perf/urgent fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 02/11] perf tools mem: Fix -t store option for record command Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 06/11] perf script: Don't disable use_callchain if input is pipe Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 03/11] perf ppc64le: Fix build failure when libelf is not present Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 11/11] perf intel-pt: Fix occasional decoding errors when tracing system-wide Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 04/11] perf jitdump: Add the right header to get the major()/minor() definitions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 09/11] perf probe: Release resources on error when handling exit paths Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 10/11] tools: Sync kvm related header files for arm64 and s390 Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 05/11] perf script: Show proper message when failed list scripts Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[PATCH 07/11] perf symbols: Fix annotation of objects with debuginfo files Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 00:10 +0200
[GIT PULL v2 00/11] perf/urgent fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-08-16 15:40 +0200
Re: [GIT PULL v2 00/11] perf/urgent fixes Ingo Molnar <mingo@kernel.org> - 2016-08-16 20:20 +0200
csiph-web