From: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Taeung Song <treeze.taeung@gmail.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Wang Nan <wangnan0@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
"Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Subject: [PATCH review for 4.4 11/24] perf tools: Only increase index if perf_evsel__new_idx() succeeds
Date: Sat, 7 Oct 2017 22:37:46 +0000 [thread overview]
Message-ID: <20171007223738.25013-11-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171007223738.25013-1-alexander.levin@verizon.com>
From: Taeung Song <treeze.taeung@gmail.com>
[ Upstream commit 75fc5ae5cc53fff71041ecadeb3354a2b4c9fe42 ]
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1485952447-7013-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
---
tools/perf/util/parse-events.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 38304b7e4f81..e81dfb2e239c 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -291,10 +291,11 @@ __add_event(struct list_head *list, int *idx,
event_attr_init(attr);
- evsel = perf_evsel__new_idx(attr, (*idx)++);
+ evsel = perf_evsel__new_idx(attr, *idx);
if (!evsel)
return NULL;
+ (*idx)++;
evsel->cpus = cpu_map__get(cpus);
evsel->own_cpus = cpu_map__get(cpus);
--
2.11.0
next prev parent reply other threads:[~2017-10-07 22:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-07 22:37 [PATCH review for 4.4 01/24] PM / wakeirq: report a wakeup_event on dedicated wekup irq Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 04/24] mfd: ab8500-sysctrl: Handle probe deferral Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 05/24] mfd: axp20x: Fix axp288 PEK_DBR and PEK_DBF irqs being swapped Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 03/24] ARM: pxa: Don't rely on public mmc header to include leds.h Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 02/24] mmc: s3cmci: include linux/interrupt.h for tasklet_struct Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 09/24] i2c: riic: correctly finish transfers Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 07/24] ext4: fix stripe-unaligned allocations Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 06/24] staging: rtl8712u: Fix endian settings for structs describing network packets Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 08/24] ext4: do not use stripe_width if it is not set Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 14/24] dmaengine: sun6i: allow build on ARM64 platforms (sun50i) Levin, Alexander (Sasha Levin)
2017-10-08 2:27 ` Icenowy Zheng
2017-10-24 2:19 ` Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 13/24] drm/msm/dsi: Set msm_dsi->encoders before initializing bridge Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 10/24] drm/amdgpu: when dpm disabled, also need to stop/start vce Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 12/24] [media] cx231xx: Fix I2C on Internal Master 3 Bus Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` Levin, Alexander (Sasha Levin) [this message]
2017-10-07 22:37 ` [PATCH review for 4.4 17/24] platform/x86: intel_mid_thermal: Fix module autoload Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 16/24] scsi: aacraid: Process Error for response I/O Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 15/24] xen/manage: correct return value check on xenbus_scanf() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 20/24] staging: lustre: ptlrpc: skip lock if export failed Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 21/24] [media] exynos4-is: fimc-is: Unmap region obtained by of_iomap() Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 22/24] mei: return error on notification request to a disconnected client Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 18/24] staging: lustre: llite: don't invoke direct_IO for the EOF case Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 19/24] staging: lustre: hsm: stack overrun in hai_dump_data_field Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 24/24] [media] bt8xx: fix memory leak Levin, Alexander (Sasha Levin)
2017-10-07 22:37 ` [PATCH review for 4.4 23/24] s390/dasd: check for device error pointer within state change interrupts Levin, Alexander (Sasha Levin)
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=20171007223738.25013-11-alexander.levin@verizon.com \
--to=alexander.levin@verizon.com \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=treeze.taeung@gmail.com \
--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
all inboxes | Powered by JetHome®