Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3541701ybz; Mon, 20 Apr 2020 05:00:35 -0700 (PDT) X-Google-Smtp-Source: APiQypLeCpcUTSgNKH0CnmPgTNm11ZV9TNex8Um8WKqtuXnxfvIM49w+dK3r6Y2zenvJAk62BQoZ X-Received: by 2002:a17:907:2645:: with SMTP id ar5mr16015836ejc.75.1587384035225; Mon, 20 Apr 2020 05:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587384035; cv=none; d=google.com; s=arc-20160816; b=Tn5uISoBusq27mHBl4PMhcQKmd1F7ED45pd9gnzyM57rut6IsdHxgeUrNp1Wl0ohvE ISTGLh23PlhSijJfa4J0uafBb4UReHoWf+uq+bOqRpost4AqNwgFmpn1vvFqtEcrw++d k9pMjodUiHZGerf6+U+yS0jMxJ69oGds2HtnwTiN9El+hLXGwY0ixtDDp/hSvG2FLArH BwhaOw3+d+z/f8q6tu81MoPxk0XQzIRiU6wwwQKytC9tIsoSNcB6K1ysZ86AMuwxKv07 Ss2AO5p5jKsyDJrJfp9iueXChx00ugc+Wo8XCrS8ZHYGsoC9hUcPeJ3gQRR6+UXUDP/L dInA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gOeH3TwlkMkD7P0qzASxV6dF0EDdLf0G3CZGUv7gSGE=; b=tav1kSQOH51h/JCXaM8IX/MyP6BYZutOGY6rE4lkT6NwXe85KpPrCosvAonv9eNC7U SpvyEf/f/6PY+na0Kir+GErZhiDKgILXrOWMWvm/ydbIUNYVuwYG2kAlJUab+PUy9IhU KjISx6PC8mt1QdU9mO8QXd7vB2HqHj5AFF3L5eDJni+0MAirsP216g6t9nUuaNJSh1OE +CT9tDo9Fk8hyUcygJaAcA/1ZFsw3e7PBDCneRaa1FwrncAhd8qrTvKwN6g3JrGs2aTc rInmLhHrG/nfwB4zzXQF1rA0hT1KOhZDEgqYyc1YDMORbNZAOrHzfLwCJBeeimzCbLKv PycQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bFWdIZjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u12si369235edb.262.2020.04.20.05.00.11; Mon, 20 Apr 2020 05:00:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bFWdIZjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727058AbgDTL4Y (ORCPT + 99 others); Mon, 20 Apr 2020 07:56:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:40704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726619AbgDTL4W (ORCPT ); Mon, 20 Apr 2020 07:56:22 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3AC8E20724; Mon, 20 Apr 2020 11:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383781; bh=irZ+OOlmNaliH/5qXRCwQzny4eYI1NGTZ269pIljA7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bFWdIZjd958hIjt09mcLts76g01lUfbFQVPWLXK2U5oKAmAtcCGwdRGoZWAi7kX6+ 6wu9RYzpxyyJs61OXNT0M+WShk06bttrR555SY+wwohspAGRfupVL6e1BrezO8VoAO u5/1dGF4SP60BzoBzx53xn4knqeRxXLv6ZXsRtak= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , Andi Kleen , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 40/60] perf evlist: Allow multiple read formats Date: Mon, 20 Apr 2020 08:52:56 -0300 Message-Id: <20200420115316.18781-41-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200420115316.18781-1-acme@kernel.org> References: <20200420115316.18781-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter Tools find the correct evsel, and therefore read format, using the event ID, so it isn't necessary for all read formats to be the same. In the case of leader-sampling of AUX area events, dummy tracking events will have a different read format, so relax the validation to become a debug message only. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200401101613.6201-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 1548237b6558..82d9f9bb8975 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1131,8 +1131,10 @@ bool perf_evlist__valid_read_format(struct evlist *evlist) u64 sample_type = first->core.attr.sample_type; evlist__for_each_entry(evlist, pos) { - if (read_format != pos->core.attr.read_format) - return false; + if (read_format != pos->core.attr.read_format) { + pr_debug("Read format differs %#" PRIx64 " vs %#" PRIx64 "\n", + read_format, (u64)pos->core.attr.read_format); + } } /* PERF_SAMPLE_READ imples PERF_FORMAT_ID. */ -- 2.21.1