Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1445634

[PATCH V2 1/3] perf/core: Fixing filename for start/stop filters

Path csiph.com!au2pb.net!2.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Mathieu Poirier <mathieu.poirier@linaro.org>
Newsgroups linux.kernel
Subject [PATCH V2 1/3] perf/core: Fixing filename for start/stop filters
Date Mon, 18 Jul 2016 18:50:02 +0200
Message-ID <rWjTY-fe-23@gated-at.bofh.it> (permalink)
References <rWjTY-fe-25@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gDC+CAqYZVXaRVDPzrkQxY88hbiNbvbbmujXq8S42/o=; b=EslnKF6xjTOmpc8wFWJ5AvybdjXuL7Q+/cEEMYyrUj3CwvCRRkOpj5SagoFXX2p/ID XdVtkt5wFpknMXpXEgCk7pvsyzaFpU0A9LxjwL8GzDuJaLvLIA2EcGhVV97GBrE/fdoX lSKZtS0opjj/X+irG0PRfUlAptrjhwbyUxi3E=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gDC+CAqYZVXaRVDPzrkQxY88hbiNbvbbmujXq8S42/o=; b=QP8CO3Tb0lXemaCv5+QdZA462ilpbDCS8PBdCNgvnihCOcaAwwzNAhEKot22INLQt+ B+YvanvpOqulko+Wxa7W+UDwikBj8fihQll8+KfS2FoDBbSJLGTYsbst+bS8CtIlFp3v apkLMmlVAm0hL29hpO8XX/yQdWxbf/HPMWCbpEtV+SqTl0XX3hxxU3p8OaIFwB5dSG/p RpMeB073Hj1WieKpyCWpsn3jZPX2pZZK3mVzDHUn2L0DXHERgWdtVi/mScnodSXxild4 WDbeuEPGcP3BNLO9aZIl60LswO5zrxkH5B04NadWUSFvL7bxZcUHrQq4mifa22QCpAfm dDAw==
X-Gm-Message-State ALyK8tIXlKITwz4qpssFgwtqylrgVVVHzRzWjQ3+RGKw3yTyVB8MVec5hqOWLH/IbEnYrVEN
X-Received by 10.36.55.2 with SMTP id r2mr49621433itr.73.1468860233226; Mon, 18 Jul 2016 09:43:53 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 29
Organization linux.* mail to news gateway
X-Original-Cc peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org, Mathieu Poirier <mathieu.poirier@linaro.org>
X-Original-Date Mon, 18 Jul 2016 10:43:05 -0600
X-Original-Message-ID <1468860187-318-2-git-send-email-mathieu.poirier@linaro.org>
X-Original-References <1468860187-318-1-git-send-email-mathieu.poirier@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1445634

Show key headers only | View raw


Binary file names have to be supplied for both range and start/stop
filters but the current code only process the filename if an
address range filter is specified.  This code adds processing of
the filename for start/stop filters.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 kernel/events/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 912f10dfbfe5..a8371814dbf4 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7852,8 +7852,10 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
 					goto fail;
 			}
 
-			if (token == IF_SRC_FILE) {
-				filename = match_strdup(&args[2]);
+			if (token == IF_SRC_FILE || token == IF_SRC_FILEADDR) {
+				int fpos = filter->range ? 2 : 1;
+
+				filename = match_strdup(&args[fpos]);
 				if (!filename) {
 					ret = -ENOMEM;
 					goto fail;
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH V2 1/3] perf/core: Fixing filename for start/stop filters Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-18 18:50 +0200

csiph-web