Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755180AbbFLO3N (ORCPT ); Fri, 12 Jun 2015 10:29:13 -0400 Received: from mail-qg0-f54.google.com ([209.85.192.54]:34138 "EHLO mail-qg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968AbbFLO3K (ORCPT ); Fri, 12 Jun 2015 10:29:10 -0400 Message-ID: <557AECB4.5050709@gmail.com> Date: Fri, 12 Jun 2015 08:29:08 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Adrian Hunter , 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: Re: [RFC PATCH] perf: Add PERF_RECORD_SWITCH to indicate context switches References: <1433859670-10806-1-git-send-email-adrian.hunter@intel.com> <20150611141548.GW19282@twins.programming.kicks-ass.net> <557ABE8B.1020705@intel.com> In-Reply-To: <557ABE8B.1020705@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1554 Lines: 30 On 6/12/15 5:12 AM, Adrian Hunter wrote: >>> This new PERF_RECORD_SWITCH event does not have those problems >>> and it also has a couple of other small advantages. It is >>> easier to use because it is an auxiliary event (like mmap, >>> comm and task events) which can be enabled by setting a single >>> bit. It is smaller than sched:sched_switch and easier to parse. >> >> Right, so the one wee problem I have is that this only provides sched_in >> data, I imagine people might be interested in sched_out as well. > > That is not a problem although it would be interesting to know the use-case. > To me it seemed unreasonable to expect to analyze scheduler behaviour > without admin-level privileges since it is inherently an administrative > activity. One use case is wanting to analyze a set of processes -- how long they run when scheduled, where they are when scheduled out, scheduling delay on wakeups, time between scehd in. I wrote the timehist tool in 2010 it has been really helpful understanding what is happening on each cpu and characteristics of a set of processes (e.g. ping ponging between tasks sending messages to each other). In this case it is not necessarily scheduler behavior (though it does it enter the picture to a degree), but rather behavior of a process or set of tasks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/