Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1494173rwb; Fri, 13 Jan 2023 13:08:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXvdsgHBieHJZVKagAu/R6AH/DL+X00QZoCnZiIPVCmv7A/I2rVLZsTL2KSBR22lv3ZCxqiC X-Received: by 2002:aa7:8284:0:b0:582:13b6:d2da with SMTP id s4-20020aa78284000000b0058213b6d2damr50140354pfm.5.1673644115854; Fri, 13 Jan 2023 13:08:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673644115; cv=none; d=google.com; s=arc-20160816; b=WJivxSakMFIITeHmGT8fN136dKD5qo+2PB51NOT4qzNajxBAE4bJGGOjsuyufI4nBR E58z+inFXtMmmEZkbCpZixcGYWl/uy8dP6s5YvFbNoq4UdNBKkwfx4XZ6mZS8bS8KPzh 3QZAYppdjZ9svXzXpWZhzHwSPK/ltSwN3XvE1N3AiQIBsE7um2fn8NkFvVUfSV1xSvxF aYsSprX/2dBwiRa0mCtruw+U+yHUcrZ9V5ykEhpbo60P46Ar9Jvdf81SK0NaytsSdt11 UGl/s7yd4pJXBk9E8uOPd8xv1Z/7JX0Xj61DkDSeSkQgl+qIymXs7MQfgVR6qOhWDRjb ECWQ== 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=OYF/Lc0R6G1ZmEcqQOBmpJux0IuT/7U3X7tJ+IPC/ao=; b=Sl61u7URcS+XagyJ94iU4UOYf/wL8kuhtgQyw4n9fG9YW8Ib/U4GLZXXK/CjUOOGJQ VL+y15xdMBGDEsXkNui28QUX63+Bz2N1jmzila699uXw39La24qgpTamAs7XsR7fDAOX W3h8wax7NZCY0jFARxgvEZZj4qga3INLVGYrS4eHZXeQHWd12IAbHYyCvyJCOWnz/0WN DuaT6K8Q6PC+nLEy0STXFOtr8B3UCd3y7+IMEtrYy0ObO4K1K05G0EKtWsJ2lGuLKNRG YihVUxuQ0NUaayoTKf65gomrFNATo5p+2b+8S2e2gMxpXZyLOBEoZJwNSG/KvizZcYWY OBnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bUA64pcd; 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 v3-20020a62a503000000b0058bc2e77660si1048104pfm.37.2023.01.13.13.08.29; Fri, 13 Jan 2023 13:08: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=bUA64pcd; 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 S229793AbjAMUon (ORCPT + 52 others); Fri, 13 Jan 2023 15:44:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbjAMUok (ORCPT ); Fri, 13 Jan 2023 15:44:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C6678793B for ; Fri, 13 Jan 2023 12:44:39 -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 AF19D60D3B for ; Fri, 13 Jan 2023 20:44:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 101C0C433F1 for ; Fri, 13 Jan 2023 20:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673642678; bh=4KWlkhuwcPpYsTSELkGTvyIM676qJP613CiwlFlJz4M=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bUA64pcd/0ISoQhyJtpEirJ7CcWhgshSsNym7VWuGXYBOOX6o+/jy9zk7m2O8euva kMaKRI2RQYOAQk+Emo9tuBB58bD/ywY7MSr7DmW5GF3LimadFnq26iwLsJK/cb/C/1 n9RUNK1eZrvpay+Rwk+UuZmZTTVgRzidl8+O7hq2nfBAlSNp11JnxbUUOGzmg+17Y/ Lz41dnTtUhfCr10k3lHtX7eLLKiCH9t1UUafTsiuWKD3rc2Z1yJX9h05dhm0uv/Dh2 jC+GKW7ouiSBly3WqhFzZjzk0wO2GmjSBEJZ1v3giVIDflkFRx7hP+1TvuJbCmqjiX TrvW5F6JmLyOw== Received: by mail-lj1-f181.google.com with SMTP id s22so23657335ljp.5 for ; Fri, 13 Jan 2023 12:44:37 -0800 (PST) X-Gm-Message-State: AFqh2kos6G0QWNYLCPwxznBHBc6FhcJ2UaHP+hTSMQHuj4MG1gHK52iI ztyEeN2tTUNM3urdY3LMmBE+z3rhKG5LL5uJDQ4= X-Received: by 2002:a2e:a26a:0:b0:285:3383:6635 with SMTP id k10-20020a2ea26a000000b0028533836635mr1408700ljm.323.1673642676044; Fri, 13 Jan 2023 12:44:36 -0800 (PST) MIME-Version: 1.0 References: <20230112214015.1014857-1-namhyung@kernel.org> <20230112214015.1014857-2-namhyung@kernel.org> In-Reply-To: <20230112214015.1014857-2-namhyung@kernel.org> From: Song Liu Date: Fri, 13 Jan 2023 12:44:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/8] perf/core: Save the dynamic parts of sample data size To: Namhyung Kim Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , LKML 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: > > The perf sample data can be divided into parts. The event->header_size > and event->id_header_size keep the static part of the sample data which > is determined by the sample_type flags. > > But other parts like CALLCHAIN and BRANCH_STACK are changing dynamically > so it needs to see the actual data. In preparation of handling repeated > calls for perf_prepare_sample(), it can save the dynamic size to the > perf sample data to avoid the duplicate work. > > Signed-off-by: Namhyung Kim Acked-by: Song Liu