linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>,
	Hendrik Brueckner <brueckner@linux.vnet.ibm.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 05/30] perf evsel: Fix up leftover perf_evsel_stat usage via evsel->priv
Date: Tue, 28 Nov 2017 12:01:55 -0300	[thread overview]
Message-ID: <20171128150220.5064-6-acme@kernel.org> (raw)
In-Reply-To: <20171128150220.5064-1-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

I forgot one conversion, which got noticed by Thomas when running:

  $ perf stat  -e '{cpu-clock,instructions}' kill
  kill: not enough arguments
  Segmentation fault (core dumped)
  $

Fix it, those stats are in evsel->stats, not anymore in evsel->priv.

Reported-by: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Tested-by: Thomas-Mich Richter <tmricht@linux.vnet.ibm.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: e669e833da8d ("perf evsel: Restore evsel->priv as a tool private area")
Link: http://lkml.kernel.org/r/20171109150046.GN4333@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index bfde6a7a80f2..d5fbcf8c7aa7 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1375,7 +1375,7 @@ perf_evsel__process_group_data(struct perf_evsel *leader,
 static int
 perf_evsel__read_group(struct perf_evsel *leader, int cpu, int thread)
 {
-	struct perf_stat_evsel *ps = leader->priv;
+	struct perf_stat_evsel *ps = leader->stats;
 	u64 read_format = leader->attr.read_format;
 	int size = perf_evsel__read_size(leader);
 	u64 *data = ps->group_data;
-- 
2.13.6

  parent reply	other threads:[~2017-11-28 15:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 15:01 [GIT PULL 00/30] perf/urgent fixes Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 01/30] perf evlist: Set the correct idx when adding dummy events Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 02/30] perf record: Generate PERF_RECORD_{MMAP,COMM,EXEC} with --delay Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 03/30] perf record: Fix -c/-F options for cpu event aliases Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 04/30] perf trace: Fix an exit code of trace__symbols_init Arnaldo Carvalho de Melo
2017-11-28 15:01 ` Arnaldo Carvalho de Melo [this message]
2017-11-28 15:01 ` [PATCH 06/30] perf script: Fix --per-event-dump for auxtrace synth evsels Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 07/30] perf machine: Guard against NULL in machine__exit() Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 08/30] perf help: Fix a bug during strstart() conversion Arnaldo Carvalho de Melo
2017-11-28 15:01 ` [PATCH 09/30] perf annotate: Do not truncate instruction names at 6 chars Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 10/30] perf test shell: Fix check open filename arg using 'perf trace' on s390x Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 11/30] perf test shell: Fix test case probe libc's inet_pton " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 12/30] perf evlist: Add helper to check if attr.exclude_kernel is set in all evsels Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 13/30] perf report: Ignore kptr_restrict when not sampling the kernel Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 14/30] perf record: " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 15/30] perf top: " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 16/30] perf: Fix header.size for namespace events Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 17/30] perf top: Fix window dimensions change handling Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 18/30] perf top: Use signal interface for SIGWINCH handler Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 19/30] perf bench numa: Fixup discontiguous/sparse numa nodes Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 20/30] perf test: Fix test 21 for s390x Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 21/30] perf intel-pt: Bring instruction decoder files into line with the kernel Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 22/30] tools/headers: Synchronize kernel x86 UAPI headers Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 23/30] tools headers: Synchronize kernel ABI headers wrt SPDX tags Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 24/30] tools headers: Synchronize perf_event.h header Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 25/30] tools headers uapi: Synchronize drm/drm.h Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 26/30] tools headers: Synchronize drm/i915_drm.h Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 27/30] tools headers: Synchronize KVM arch ABI headers Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 28/30] tools headers: Synchronize prctl.h ABI header Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 29/30] tools headers: Syncronize mman.h " Arnaldo Carvalho de Melo
2017-11-28 15:02 ` [PATCH 30/30] perf tools s390: Do not include header files from the kernel sources Arnaldo Carvalho de Melo
2017-11-28 16:20 ` [GIT PULL 00/30] perf/urgent fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171128150220.5064-6-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=andi@firstfloor.org \
    --cc=brueckner@linux.vnet.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).