From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754368AbdKMSXv (ORCPT ); Mon, 13 Nov 2017 13:23:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:53294 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753118AbdKMSXt (ORCPT ); Mon, 13 Nov 2017 13:23:49 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CE7021910 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Mon, 13 Nov 2017 15:23:46 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Andi Kleen , jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v1 3/5] perf, tools, script: Allow printing period for non freq mode groups Message-ID: <20171113182346.GC4123@kernel.org> References: <20171109145528.23371-1-andi@firstfloor.org> <20171109145528.23371-4-andi@firstfloor.org> <20171113091158.GC21325@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171113091158.GC21325@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Nov 13, 2017 at 10:11:58AM +0100, Jiri Olsa escreveu: > On Thu, Nov 09, 2017 at 06:55:26AM -0800, Andi Kleen wrote: > > From: Andi Kleen > > > > When using leader sampling the values of the not sampled but counted > > events are shown by perf script in "period". > > > > Currently printing period is only allowed when the main event > > has a period, that is it is in frequency mode. > > > > This implies that we cannot dump the values of counted events > > when the leader event is not in frequency mode. > > > > Just remove the check that the period must be set on all > > events. It will just be printed as 0 instead if it's not > > available. > > it'll be the value of configured period, not 0 > > int perf_evsel__parse_sample(struct ... > ... > data->period = evsel->attr.sample_period; > > $ perf record -c 100000 > $ perf script -F event,period | head -3 > Failed to open /tmp/perf-2048.map, continuing without symbols > 100000 cycles:ppp: > 100000 cycles:ppp: > > > other than that I think we can remove that check, > because we will have always sane number in period > > Acked-by: Jiri Olsa Applied, after adding your comments. - Arnaldo