From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756102AbbGGIjT (ORCPT ); Tue, 7 Jul 2015 04:39:19 -0400 Received: from mga01.intel.com ([192.55.52.88]:4072 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754940AbbGGIjO (ORCPT ); Tue, 7 Jul 2015 04:39:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,421,1432623600"; d="scan'208";a="742016193" From: Adrian Hunter To: Peter Zijlstra Cc: Andi Kleen , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Jiri Olsa , Stephane Eranian , mathieu.poirier@linaro.org, Pawel Moll Subject: [PATCH V3 0/4] perf: Add PERF_RECORD_SWITCH to indicate context switches Date: Tue, 7 Jul 2015 11:36:38 +0300 Message-Id: <1436258202-6540-1-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.9.1 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Here is V3 of PERF_RECORD_SWITCH. Changes in V3: Rename 'perf_event_switch()' parameter 'out' to be 'sched_in' and invert meaning. Changes in V2 (RFC): The event now shows scheduling in and out, and I added next/prev pid/tid for cpu-wide contexts, plus there are some tools patches that apply to Arnaldo's perf/core branch. Adrian Hunter (4): perf: Add PERF_RECORD_SWITCH to indicate context switches perf tools: Add new PERF_RECORD_SWITCH event perf record: Add option --switch-events to select PERF_RECORD_SWITCH events perf script: Add option --show-switch-events include/uapi/linux/perf_event.h | 20 +++++- kernel/events/core.c | 102 +++++++++++++++++++++++++++++++ tools/perf/Documentation/perf-record.txt | 3 + tools/perf/Documentation/perf-script.txt | 3 + tools/perf/builtin-inject.c | 1 + tools/perf/builtin-record.c | 7 +++ tools/perf/builtin-script.c | 31 ++++++++++ tools/perf/perf.h | 1 + tools/perf/util/event.c | 26 ++++++++ tools/perf/util/event.h | 12 ++++ tools/perf/util/evlist.h | 1 + tools/perf/util/evsel.c | 4 ++ tools/perf/util/machine.c | 10 +++ tools/perf/util/machine.h | 2 + tools/perf/util/record.c | 10 +++ tools/perf/util/session.c | 16 +++++ tools/perf/util/tool.h | 1 + 17 files changed, 249 insertions(+), 1 deletion(-) Regards Adrian