Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755506AbbFLNSD (ORCPT ); Fri, 12 Jun 2015 09:18:03 -0400 Received: from mga02.intel.com ([134.134.136.20]:9322 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755282AbbFLNSB (ORCPT ); Fri, 12 Jun 2015 09:18:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,602,1427785200"; d="scan'208";a="507223357" Message-ID: <557ADB6E.8080604@intel.com> Date: Fri, 12 Jun 2015 16:15:26 +0300 From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo , Peter Zijlstra CC: Andi Kleen , 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> <20150612120938.GS3644@twins.programming.kicks-ass.net> <20150612123643.GA6850@kernel.org> In-Reply-To: <20150612123643.GA6850@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2154 Lines: 57 On 12/06/15 15:36, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 12, 2015 at 02:09:38PM +0200, Peter Zijlstra escreveu: >> On Fri, Jun 12, 2015 at 02:12:11PM +0300, Adrian Hunter wrote: >>> On 11/06/15 17:15, Peter Zijlstra wrote: >> >>>> 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. >> >> I was more thinking about it being used to track event duration inside a >> task. Say you want measure the time between event A and event B but got >> scheduled out in between. >> >> ---- A ----] .... [---- B ----- >> >> If you do not have the sched_out time, you cannot correct for that. Thanks for the example. >> >>>> all 3 are already part of sample_id. >>> >>> You have to decide whether you expect to be able to use an event without >>> sample_id. MMAP and MMAP2 both have pid, tid which are in sample_id, LOST >>> has id, EXIT and FORK have time, all of the THROTTLE/UNTHROTTLE members are >>> in sample_id etc. So it currently looks like we expect to be able to use an >>> event without requiring sample_id. > > The fact that there is this duplication is because sample_id_all came > after those events, but this new one being proposed doesn't have to do > it :-) Thanks, that's clear then. There will just need to be a flag to indicate whether it is scheduling in or out. > >> I think we recently had this discussion: >> >> lkml.kernel.org/r/1430940834-8964-8-git-send-email-kan.liang@intel.com >> >> The patch we ended up merging: >> >> f38b0dbb491a ("perf/x86/intel: Introduce PERF_RECORD_LOST_SAMPLES") >> >> Does indeed require sample_id. > > -- 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/