Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1553599rwb; Fri, 13 Jan 2023 14:04:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXuWV/A1LZva7xZUMpwFRClF+i9sFSVkhCDFVqWjFysMfGatxbYRo6lUEuTaZBDOhAfwYw8w X-Received: by 2002:a05:6402:538e:b0:48e:bf0d:f3a8 with SMTP id ew14-20020a056402538e00b0048ebf0df3a8mr32629121edb.38.1673647475161; Fri, 13 Jan 2023 14:04:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673647475; cv=none; d=google.com; s=arc-20160816; b=hIjD2nxGqADOHvd4u9zYcA+h4sOvWurUEFdGMskPEOZvLfOs7oHdIs25BDbLOIotqh JSJ5n10fWTuJ6Ih7SwbtjHsO2yf58gSX2ILrXNjm0UBb1pmmeYrHh18UAaOhP1uE689/ RV5h8Gl8lek0O92uaEXCnwRqWXU5/CIG3o4+TELHDpK6iFtmy7UxY36SmfuuZ1UKKlcO GkNN9AMdwZB9xIizpn0KD7D7hlh9shbCm4SSmmMQFsCC4dwv+VNWwavFXUHXnjcsuw1R 8NZ5vxOX564TA064DZhck/3NLXESxi2NDE8q9cUmOEyfZqKOsomAf1XqcPK+ivPuGKEG ZwSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0FVzf6yMOJV1/lWKf4eOppKwRrG1u9c/xElEn+pOW6g=; b=ZuzhPmvhI2x4PkeVMZF3hLbN+35gC+AG0UcBmBUhdDlcC1rVP/VCEr6tuAPWxuSSph 20uta5gfqy6y3i7IlqX5pnGStNSqLadD4+10GMF+J4G33rhHSdZo7jK4NrAHUKZAPUbS pZI4aesRJiDDWc4jKZ2DvVzLu2yHt1Zf/UaLMpdF+4dd3LPG/wOrMLGWh4bQbyRmnC8b SrjrBbE/YQ+iKNDGsU+t5jotm1kVZjLG7pfVhyzw8cEQV2GeD72QA8PKGkfM0cwIUL3Z AMZ0jTbKmI2QyITJtp2ZcBQfU3EB2c+8+Cp5GpnMSo7Nh6J3Y6lEXJe0T1dqsdhX4a1n qtQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XHW+II8V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d28-20020a056402517c00b0047f76f5cb0esi20756980ede.525.2023.01.13.14.04.22; Fri, 13 Jan 2023 14:04:35 -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=@kernel.org header.s=k20201202 header.b=XHW+II8V; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230138AbjAMVGf (ORCPT + 52 others); Fri, 13 Jan 2023 16:06:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbjAMVGc (ORCPT ); Fri, 13 Jan 2023 16:06:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D82714B5; Fri, 13 Jan 2023 13:06:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E25F560E0B; Fri, 13 Jan 2023 21:06:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D5FCC433F2; Fri, 13 Jan 2023 21:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673643989; bh=0FVzf6yMOJV1/lWKf4eOppKwRrG1u9c/xElEn+pOW6g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XHW+II8VTmjDd2IjPOkub6Sbny6KV7fcE1GKLhfmF4wxH32SaE/L0Nr4V9fPzPNcA ORhsWdDhwzS3HcxfEhvFLFXNjCEJPV8NzJpn2eWIwDkAzoraBQiSEt8UB0xfvlt5dH WeELJa+ZO444KTNou+IgQ74LFJoNB+2Nh6zk5/absoROUeW0EtvChXzMGBHGUEWvQo QdKtVROVQTsbDa2XZVl5yDirZeyye+bJ3fraLLng27j4ZxWYHp1Lhq3UHBs5GGklPP Y/97fEgv7t7zeiNujgCeD0KYWyUvhKSRbHo4g3BZlQOxWQkWl6OLr1Z5jaRlAMf+88 9R2LL6hFd3O6Q== Received: by mail-lf1-f43.google.com with SMTP id bf43so34800428lfb.6; Fri, 13 Jan 2023 13:06:29 -0800 (PST) X-Gm-Message-State: AFqh2koVTjWl3Z01eLVB1WqSiRitZUZEok++Uk6eVe9Qpet/9DCO48ys MVo+jIA6W3Yzyb7iDnT4nXFr+ssx3YBfdyHh3YY= X-Received: by 2002:ac2:4a8d:0:b0:4a2:4282:89c7 with SMTP id l13-20020ac24a8d000000b004a2428289c7mr6165278lfp.437.1673643987303; Fri, 13 Jan 2023 13:06:27 -0800 (PST) MIME-Version: 1.0 References: <20230112214015.1014857-1-namhyung@kernel.org> <20230112214015.1014857-8-namhyung@kernel.org> In-Reply-To: <20230112214015.1014857-8-namhyung@kernel.org> From: Song Liu Date: Fri, 13 Jan 2023 13:06:14 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 7/8] perf/core: Introduce perf_prepare_header() To: Namhyung Kim Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , LKML , linux-s390@vger.kernel.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 1:40 PM Namhyung Kim wrote: > > Factor out perf_prepare_header() so that it can call > perf_prepare_sample() without a header if not needed. > > Also it checks the filtered_sample_type to avoid duplicate > work when perf_prepare_sample() is called twice (or more). > > Cc: linux-s390@vger.kernel.org > Cc: x86@kernel.org > Suggested-by: Peter Zijlstr > Signed-off-by: Namhyung Kim Acked-by: Song Liu