From patchwork Fri Sep 18 20:42:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 53946 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 895E722A0D for ; Fri, 18 Sep 2015 20:42:36 +0000 (UTC) Received: by lagj9 with SMTP id j9sf24096042lag.0 for ; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=etc4HKJFRnDPg5NIBB31oRVwIagBbwMpehznjfGjBQU=; b=cV+dNxKFnirCbxBCh9knDSlNzDy0YdKf2ltr1HQFAlCvAEPmE2plX5cP7kdsE9kwcU CT7V0dnH4wae2ktN2XF6K+Ujc0TOj75AeV8zP0x9ZVg4k4jEBhxZJFQbcyPBAu293/A4 ZQgQm9MG4eB3uGTHDplhedqF8ljP99PnvLMSheL/obH2wKExOBYua2X3OLToOrW5ZYVm hN4MShMy0s3SfzfPMZdkNaaZho1yFK4MiUjl2ahsLfwUFZqQZQUp6AQXCOaBUxA5+XWo m6JUSKtBAgGyXq6qQSqr3nTq02Gxzrx3/a8AKYDSnfltdN3qxWHV6HvqZh90+DGEtV5b GWhw== X-Gm-Message-State: ALoCoQkr8lx4rtsXqTzM6kjTo5WWKHHT2Oii+Xjy3U4iSjaXgghXiCZ1zmejdq6uK5uM6W8QHy0/ X-Received: by 10.152.6.201 with SMTP id d9mr1248962laa.6.1442608955446; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.11 with SMTP id ku11ls297833lac.2.gmail; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) X-Received: by 10.152.204.108 with SMTP id kx12mr4016596lac.20.1442608955277; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id u129si58959lfd.130.2015.09.18.13.42.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 13:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbcao8 with SMTP id ao8so30651800lbc.3 for ; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) X-Received: by 10.152.161.232 with SMTP id xv8mr4096307lab.32.1442608955111; Fri, 18 Sep 2015 13:42:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp511036lbq; Fri, 18 Sep 2015 13:42:34 -0700 (PDT) X-Received: by 10.66.253.229 with SMTP id ad5mr9130915pad.101.1442608953878; Fri, 18 Sep 2015 13:42:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si16206329pbq.228.2015.09.18.13.42.33; Fri, 18 Sep 2015 13:42:33 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752426AbbIRUmc (ORCPT + 30 others); Fri, 18 Sep 2015 16:42:32 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:35965 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbbIRUma (ORCPT ); Fri, 18 Sep 2015 16:42:30 -0400 Received: by padhk3 with SMTP id hk3so59735893pad.3 for ; Fri, 18 Sep 2015 13:42:30 -0700 (PDT) X-Received: by 10.67.15.36 with SMTP id fl4mr9119425pad.152.1442608950388; Fri, 18 Sep 2015 13:42:30 -0700 (PDT) Received: from t430.cg.shawcable.net ([184.64.168.246]) by smtp.gmail.com with ESMTPSA id je5sm10593035pbd.79.2015.09.18.13.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Sep 2015 13:42:29 -0700 (PDT) From: Mathieu Poirier To: a.p.zijlstra@chello.nl, mingo@redhat.com, acme@kernel.org Cc: linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, mathieu.poirier@linaro.org Subject: [PATCH] perf record: adding dummy event before mapping Date: Fri, 18 Sep 2015 14:42:04 -0600 Message-Id: <1442608924-28139-1-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mathieu.poirier@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The parameters of function 'perf_evsel__open()' in 'record_open()' have been changed to use the evsel's cpus and threads rather than the evlist since: commit d988d5ee6478 ("perf evlist: Open event on evsel cpus and threads") This works fine for as long as all the events have been added to the evlist before function 'perf_evlist__create_maps()' is called since the latter will take care of pushing the cpus and threads of the evlist to each of the evsel in the list. As function 'auxtrace_record__options()' adds a "dummy:u" event to the evlist it is important that it runs before 'perf_evlist__create_maps()'. Signed-off-by: Mathieu Poirier --- tools/perf/builtin-record.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 142eeb341b29..630a7a8e3970 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -1183,14 +1183,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused) goto out_symbol_exit; } - err = -ENOMEM; - if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0) - usage_with_options(record_usage, record_options); - err = auxtrace_record__options(rec->itr, rec->evlist, &rec->opts); if (err) goto out_symbol_exit; + err = -ENOMEM; + if (perf_evlist__create_maps(rec->evlist, &rec->opts.target) < 0) + usage_with_options(record_usage, record_options); + if (record_opts__config(&rec->opts)) { err = -EINVAL; goto out_symbol_exit;