From patchwork Fri May 24 17:34:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 165161 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp3887019ili; Fri, 24 May 2019 10:37:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxvFPYWxAL451acKtIjw5O8UeS+9nNVrIO1hoeypSaP+G+NORB7NlP4vY4c2sVIX9yGGM0R X-Received: by 2002:a17:90a:718c:: with SMTP id i12mr10968082pjk.32.1558719421495; Fri, 24 May 2019 10:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558719421; cv=none; d=google.com; s=arc-20160816; b=bJJCicRMj0h0/FHVLAfzytKkOOTiG3l4KmzLqWnjZjwUF7dCKxfGE+RUPPKWc+OXKV FljaViWsfFZRdXqQAFeIjfh9e26ghfPMPNaEBdMymW9+Oizgv+Sui9yj68bkkbBSvc+5 k0shv8u6dDnkyGOaAkx3PjUrZUtidPpxgwVyPebeDkCX+ZrRx0i7t4jqBKl9Pjr/2sgR eo+3UWk9tr7TngFFgHHFNHUom3xBfhBh8iHN+CDPn0GpX9KthJ4eM3cnNjFcLrqdyPL+ /AR2Qf2Dmqw+PCvYQc3KOe1UUaj4I6TYpJngrcKS1Icg6BkhKxi1wAM4TNm2jMbggeHO vRgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=WjG/oYBVCTJ2cGSnVCWqwlxIc3B5k8jAV6xmXnGg2uk=; b=mGqSC3J56nZybe59k/VcuHAAUI4QDTW4VlJ74Vb28/XxcVaf+/Y5cSTwyOjhbGnKH7 o6RgbZPSH/F86E1KYV6YJH7WSlbbTGssAtWtVlePyvgmnxuxC4lAsFXQ3FxIvQsDi9XH CbW6/A+M6ogOczzsB11KMWut4O+tyrAe4uWGCw6o/xn3KOO7FUK5p9RJuGaBH9aaHqvX NRtuX/DSIKaYmlYjQufpdtk0fx/FM1o7b+SX3rrUFnniedE5sVB5c0AyCS6Sd5psN0TC GnctkelDOOSPePtX6eAoMRg69DLmt3ET8uhRSiIansRzybQSPA/1iGyfDAdZIwX55dMS h+/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DWnMfzRx; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p61si5376215plb.266.2019.05.24.10.37.01; Fri, 24 May 2019 10:37:01 -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 header.s=google header.b=DWnMfzRx; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391788AbfEXRhA (ORCPT + 30 others); Fri, 24 May 2019 13:37:00 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:41216 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391362AbfEXRfO (ORCPT ); Fri, 24 May 2019 13:35:14 -0400 Received: by mail-pg1-f196.google.com with SMTP id z3so800041pgp.8 for ; Fri, 24 May 2019 10:35:14 -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=WjG/oYBVCTJ2cGSnVCWqwlxIc3B5k8jAV6xmXnGg2uk=; b=DWnMfzRx8uWzIrexmTH6icT77P0bzj4A6Bl6Me/8fyKJ8+Eh3WN52ltUnTzvTw5zRC HqrcyTxeWw74Fbnf4SkuWYKwDcySDL0v94ERXknwIAdQeEPQRTsFFy3CDrDfEMrsobFu +u6eSxb32WMlbSljrRidcbVprKanMJhy03X3qbq8Oad4e4OzTBhD7CyEW9JdLKtYDhhn vdKgLO8Ndg/mEc0nizAxhj4aLYpounInK92BylqJ4S8KAb4IaOEx2GtsMfkVQA54T0sK 9bb6sTPJaVA4Z6ZIDVcJhHa4666uS8PNjQM4icyA/sRqP7SZb86pbQUM1wNKkcdjxGpW XFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WjG/oYBVCTJ2cGSnVCWqwlxIc3B5k8jAV6xmXnGg2uk=; b=KycMgtk8SdDUy0c4iV9Qkfx5V/fh1cOSOgbGJUB3mQ6Syn5AYn4nHTgUmeGw7y/WRO bwkm+nWPcHW5L59umoiC+WJowttFXAUejMM2QTVvBkE6kgpDGOhVuCfVuAx48rBqV2Ei EiJuMesnSrahn+FG2lUYpcAHOsJaP6NdK4ncv/aHLteVHEgZNsJxCEeSZBGRBId3H9tb 3xpz9vxyJs9QJSdM9nExuugtVD3ZF4Hl2DXFdDrq0F1GzyArFyMekUtvNDTQSCSSM17B oUqm58J6CZqJMD4Zfpqyy8R63xsDriCEp6PIpOjmXXmzBbHcc2L6UqZNi+9xD7wqHjiV Sl6g== X-Gm-Message-State: APjAAAVtJmcWQMiLSGvqhnxWaL8QwV1kv38AxMBMGwENFiq2BYRUAZ4j a++bO77X4uzO0xlM4uu0tFMz3w== X-Received: by 2002:a17:90a:d992:: with SMTP id d18mr10956709pjv.74.1558719313700; Fri, 24 May 2019 10:35:13 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k13sm2809575pgr.90.2019.05.24.10.35.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:35:13 -0700 (PDT) From: Mathieu Poirier To: acme@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, suzuki.poulose@arm.com, leo.yan@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: [PATCH v2 03/17] perf tools: Configure SWITCH_EVENTS in CPU-wide mode Date: Fri, 24 May 2019 11:34:54 -0600 Message-Id: <20190524173508.29044-4-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190524173508.29044-1-mathieu.poirier@linaro.org> References: <20190524173508.29044-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ask the perf core to generate an event when processes are swapped in/out of context. That way proper action can be taken by the decoding code when faced with such event. Signed-off-by: Mathieu Poirier --- tools/perf/arch/arm/util/cs-etm.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c index be1e4f20affa..cc7f1cd23b14 100644 --- a/tools/perf/arch/arm/util/cs-etm.c +++ b/tools/perf/arch/arm/util/cs-etm.c @@ -257,6 +257,9 @@ static int cs_etm_recording_options(struct auxtrace_record *itr, ptr->evlist = evlist; ptr->snapshot_mode = opts->auxtrace_snapshot_mode; + if (perf_can_record_switch_events()) + opts->record_switch_events = true; + evlist__for_each_entry(evlist, evsel) { if (evsel->attr.type == cs_etm_pmu->type) { if (cs_etm_evsel) {