From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BA35C54EBE for ; Fri, 13 Jan 2023 11:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241087AbjAMLcM (ORCPT ); Fri, 13 Jan 2023 06:32:12 -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> 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() ?