Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp752092rwb; Fri, 13 Jan 2023 03:51:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXtTqE6bPuHeeTDQFKMArJbPNNIczlS7ozKz1v0IP60JdXsT4UkaXtusHH0pcGt4ox3CDSoQ X-Received: by 2002:a05:6402:550d:b0:461:9578:f904 with SMTP id fi13-20020a056402550d00b004619578f904mr67215707edb.23.1673610716174; Fri, 13 Jan 2023 03:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673610716; cv=none; d=google.com; s=arc-20160816; b=mI7Ia9+5/HeMFbfP5TGfsaV38pqRiaU4drFjnIsV6YccdnnNIIJqTnbcYvTJdlsdNZ ylVp68FBWXOLVHCuA4dSRychFgs1arqp8f7AJARngjpDx+k1zbpGJMl9lqxYcxCksnVU 6jbW5IxuHUzSHRVhWDaFV162IQM07M2tIY9S94YlMZktOy1p0lc8qfUYcupt/H99BNs+ KNap5jyORpJnGqHnoHtaXYMjZZV3H2FxfmcxZrTVoFbYa16cicYKImL8yh+N9DeWItWF qI1UvX+86tjJlgiL81an44POnxMOL1Y303rkMAkVWDYL/6VEsY3W/JB2ZbvxmEAl28K6 Xuug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n0AXcXCsFPlAjGu9o7oei/FdERzg6c37kBTY02Z4BpE=; b=vv1/hvu0msSR7ccrg+Vb3V4i1R3oyzsFrVEWtw1odGAkGYINN2K6eJG6LSNa/QRGN2 XI42WOYlm2c2/UfY2hygL0S7j1MXe4reugmFNUVLWWYHYD2v8F8+G8bjsDtVPXSGjlSK pSS9lv7JYbwVBe3JQAawsGVJuXkEwn8vF0XYiWDypsdKQYGei5TvgoaQbgkIRbF8vxHb hdRZa8PHPaGQ6Si0nwQXeGm5wl3K5D/PiFpo647ZVIrmZa7GUX40v/7x+sevzBDvjlHj CmxAYzwMhZCJ33IC4o8RvJqNAl0f/T+II40kTnChlbw1OBNM/otOca7pd7TAY9K3dWV6 q5gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uokiWcI9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50e60c000000b0046cf2a9bb1csi9369218edm.209.2023.01.13.03.51.43; Fri, 13 Jan 2023 03:51:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=uokiWcI9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240882AbjAMLcF (ORCPT + 53 others); Fri, 13 Jan 2023 06:32:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241239AbjAMLac (ORCPT ); Fri, 13 Jan 2023 06:30:32 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26EFD8BF21 for ; Fri, 13 Jan 2023 03:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=n0AXcXCsFPlAjGu9o7oei/FdERzg6c37kBTY02Z4BpE=; b=uokiWcI9H//1Dn6M/QoEj1i9Ok Y3EHjyT+XkYYCzazVeTqUNHLxnIjJcNdk9ZOz/08aIqaI1LyVhJ762EupHNVCvLZAIDUjISddAEZQ fThvEbXHtejsicb3Jxz2WseKDHMbqMEl31Twi89i3HzygpHzwe2UD1wZnIKrnpDzy8p3u2lSiTXt7 j4GORiBilj8YHfIAhzpqgle2Q7s8akd6yJSvB64zbIXBZuKLPf4RCPWwDk+SRxe2GkzWvSIfMWRpr 2BysJnj8+yUaHu+1LrA4ACXQwIi021yhCkOokLHNWJJxLSCtbNKw8WJZMQCJTllLbPLLT6AMwa92u McrP23+w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGI6g-0062jE-9Z; Fri, 13 Jan 2023 11:20:22 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 91C963001F7; Fri, 13 Jan 2023 12:20:08 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 81FFD2CCEBAC4; Fri, 13 Jan 2023 12:20:08 +0100 (CET) Date: Fri, 13 Jan 2023 12:20:08 +0100 From: Peter Zijlstra To: Namhyung Kim Cc: Ingo Molnar , Mark Rutland , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , LKML , Song Liu Subject: Re: [PATCH 5/8] perf/core: Set data->sample_flags in perf_prepare_sample() Message-ID: References: <20230112214015.1014857-1-namhyung@kernel.org> <20230112214015.1014857-6-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112214015.1014857-6-namhyung@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 12, 2023 at 01:40:12PM -0800, Namhyung Kim wrote: > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -7053,6 +7053,14 @@ static void perf_aux_sample_output(struct perf_event *event, > ring_buffer_put(rb); > } > > +/* > + * A set of common sample data types saved even for non-sample records > + * when event->attr.sample_id_all is set. > + */ > +#define PERF_SAMPLE_ID_ALL (PERF_SAMPLE_TID | PERF_SAMPLE_TIME | \ > + PERF_SAMPLE_CPU | PERF_SAMPLE_ID | \ > + PERF_SAMPLE_IDENTIFIER | PERF_SAMPLE_STREAM_ID) > + > __perf_event_header__init_id(header, data, event, filtered_sample_type); > + data->sample_flags |= sample_type & PERF_SAMPLE_ID_ALL; Why not update __perf_event_header__init_id() ?