From patchwork Fri Jul 15 22:25:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 72153 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp23917qga; Fri, 15 Jul 2016 15:26:17 -0700 (PDT) X-Received: by 10.98.37.71 with SMTP id l68mr25545103pfl.38.1468621576233; Fri, 15 Jul 2016 15:26:16 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r73si2434819pfi.287.2016.07.15.15.26.15; Fri, 15 Jul 2016 15:26:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751848AbcGOWZw (ORCPT + 29 others); Fri, 15 Jul 2016 18:25:52 -0400 Received: from mail-io0-f179.google.com ([209.85.223.179]:34839 "EHLO mail-io0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570AbcGOWZp (ORCPT ); Fri, 15 Jul 2016 18:25:45 -0400 Received: by mail-io0-f179.google.com with SMTP id m101so116138408ioi.2 for ; Fri, 15 Jul 2016 15:25:44 -0700 (PDT) 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=Tcg/tAuiJXgIxWK0YvqhcIIia9OBn85sYZ6FWgA0nmw=; b=TJPy6oj+j699JKp5qzkffigMLQTX2onTeEv/I3AqsKAPSj5DVBlEniumA3Y29TJW9s xWQ5qbA4066tl3pTAts9z/zDkdMajFFUOnC8feJoKk2RksI+hYCM71sHNysp99KYDVVi fF/n9hnwpyeCWdEPEGGMF4hdiN62iuI0E95cQ= 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=Tcg/tAuiJXgIxWK0YvqhcIIia9OBn85sYZ6FWgA0nmw=; b=N8J+yRjIm41kYsA8zPifjo2EpstUiAErdycqR1VwNvT/xqevVT3k7zOBiohemq5QxH CwPH0HQFSpdQDpss8C0dMXugE89H2Dfl4rfX1wFakh2KwSiOr0Aq1END31D7ZcEdwys1 rs1a5fSxJ5Coc/uEDW9kwfKNXisQW4hfVXH075tDMwujMzF44F6XYW6bHpkzNX8fD4hR kwb2edAw0FZ+3rZyCOxIIFoxb2xdKrOYHX5s45+NkQCvpjLzik47yGFhJZHnNhp6u7x+ /Y3O6GufgjmJklf3r/i5DYMlSYb+avJWZ17Rs34UmIC7aUhP6A1Y1+aR/hXM9EjzU8Q+ 8vCg== X-Gm-Message-State: ALyK8tIlmFBbV2pWyZ/Zg5oWsrUepNVKHg1t9GRbpUYkdHbxYmhJNKOEPs4jP4V91IVaaLD+ X-Received: by 10.107.145.214 with SMTP id t205mr10346067iod.135.1468621544344; Fri, 15 Jul 2016 15:25:44 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id d15sm302758itb.12.2016.07.15.15.25.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Jul 2016 15:25:43 -0700 (PDT) From: Mathieu Poirier To: alexander.shishkin@linux.intel.com Cc: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] perf/core: fixing filename for start/stop filters Date: Fri, 15 Jul 2016 16:25:39 -0600 Message-Id: <1468621541-31024-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468621541-31024-1-git-send-email-mathieu.poirier@linaro.org> References: <1468621541-31024-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- kernel/events/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/kernel/events/core.c b/kernel/events/core.c index 912f10dfbfe5..df21611585d7 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -7852,8 +7852,13 @@ 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) { + substring_t *fargs; + + fargs = (token == IF_SRC_FILEADDR ? + &args[1] : &args[2]); + + filename = match_strdup(fargs); if (!filename) { ret = -ENOMEM; goto fail;