Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751651AbdIAIbz (ORCPT ); Fri, 1 Sep 2017 04:31:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37646 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbdIAIbs (ORCPT ); Fri, 1 Sep 2017 04:31:48 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A4BDE83F44 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Fri, 1 Sep 2017 10:31:43 +0200 From: Jiri Olsa To: Stephane Eranian Cc: Andi Kleen , LKML , Arnaldo Carvalho de Melo , Peter Zijlstra , "mingo@elte.hu" , "Liang, Kan" Subject: Re: [PATCH] perf record: enable multiplexing scaling via -R Message-ID: <20170901083143.GA20459@krava> References: <87wp5wr0cb.fsf@firstfloor.org> <20170822012545.GJ2482@two.firstfloor.org> <20170822070332.GA21829@krava> <20170828204114.GR2482@two.firstfloor.org> <20170901075901.GD14815@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 01 Sep 2017 08:31:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1871 Lines: 48 On Fri, Sep 01, 2017 at 01:21:03AM -0700, Stephane Eranian wrote: SNIP > >> I am also surprised to see that perf record keep inherit=1 in > >> system-wide mode. I don't think this > >> is relavant in this mode. But the kernel this fails in this case, > >> which I think is a bug. In system-wide > >> mode, the attr-.no_inherit should be ignored. We can fix perf record > >> to avoid this in system-wide. > >> > >> The cmdline above works for both per-thread and system-wide modes. > >> > >> So I think we do not need my patch or variations thereof, everything > >> is there, though a bit difficult > >> to combine. > > > > hum, how about we introduce new modifier to attach timing info, like: > > $ perf record -e cycles:T .... > > > > modifiers might be scares resource, but we don't add them every day, > > and this requirement looks generic > > > It is not just a matter of modifier, you need to have the kernel > record just what you want. > AFAIK, the only way for the the kernel to record timings on sampling events > is to force PERF_SAMPLE_READ. So the T modifier would have to also set > that format, > at which point, I wonder how useful it is compared to S. well :S is meant to be used for leader sampling, so in addition to what you described it also disables sampling on all other group members, which I don't think you want > > Alternatively, we could improve the kernel to support recording timing with > PERF_SAMPLE_TIMINGS as a pair of u64 to represent time_enabled, time_running. > That would avoid the whole PERF_SAMPLE_READ and the extra u64 it records. > Recording the value of the sampling event is not very useful because > it keeps being > reset for each period. sounds good.. or if we mind taking another bit out of the sample_type for this we could have new read_format bit PERF_FORMAT_NO_COUNT, which would omit the count values jirka