Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5173316rwi; Mon, 17 Oct 2022 16:56:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5wIq+5a0R8d3fMIY9NDsOPZGHu1rTDrEywpUtBNPlt15Py5c0JE++scoj7/ByxmlkKz0h4 X-Received: by 2002:a17:907:6e9e:b0:78e:214b:e3c2 with SMTP id sh30-20020a1709076e9e00b0078e214be3c2mr168556ejc.15.1666050996696; Mon, 17 Oct 2022 16:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666050996; cv=none; d=google.com; s=arc-20160816; b=ftYAMy8hchdvxeMGfZ68Rb+Q4QPHzuCkyLq+WrJGaUUIDQtvdhWbOJFAGYJr8PotWg V5pqKKmGUjzXYZ1WvsKUorXn9eDAR/G6RrsKYAdvpn0b3zeJTf0RyZeDxyAUf64/eY7k XzGkqml6Wd/Qb4JxRxjFSid5ibN2HcCrdJK2CfntpY9PCqAM0YP3xP6XPJpvMFduU5/T 2WUvDxHcz8FgN7SsGQkN1/+tW0AKfHX7DVxEdXICivuQSR7iX7pR948cgOeR+AYUpnyC kTbC0NwACS5mwq7k3vOu0ubXTzgemKDJi+knH9rZBAaY4TDafQYpiq/VR6GQDSet7DOv i9vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eHIgvDHs4af6vQNoBw2jovVYt2fYFPl3kmmZLzvWFPs=; b=pdBPTWBpfn/K6SQnCLR5OUu1izplkDmWLLajR3QBNBSak2Gsdq0X9T+ocKNH+UNkq9 2b/Rsk2C4cxQYfV5PMQmeCJuxJjK9RlnXHIz2hEREhHr787lwZIWFSe3ImaCGfUJfadY EIOHGA9ubyPFSUDHjAipZAo+GapV1aTwjx5wZ+5iMWybtH611ZMxofHSSc3DR8gM+qrn PmU4vtMvj5ccJKwIZVorhMxYGR41lZJM8iiFzW8yR4jr92ooG7foZem1YBeWIF2N40bV Wl3JGtK9qHQAW4bxJsk9RQnBV+W28rWEoe4+ksZnBYIz8rSfq2/1W5/74TjeDVCgvVZk bK+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ds4uccgR; 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 s17-20020a056402521100b004523826ed6dsi10656394edd.554.2022.10.17.16.56.11; Mon, 17 Oct 2022 16:56:36 -0700 (PDT) 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=Ds4uccgR; 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 S230499AbiJQXiW (ORCPT + 99 others); Mon, 17 Oct 2022 19:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbiJQXiT (ORCPT ); Mon, 17 Oct 2022 19:38:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 008F8857D4; Mon, 17 Oct 2022 16:38:14 -0700 (PDT) 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 3E165612DC; Mon, 17 Oct 2022 23:38:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C676DC433C1; Mon, 17 Oct 2022 23:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666049892; bh=MlBnouHryaZbiw/93+me4ojj1DJ4whBS7dUdANGIhOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ds4uccgRrpkr/UI3TrihXNnk4oluADnAMxef1aeu0RK+x8oeBp7saNgL73nidKfWf zeCaKLbvMIYeQbwbAwrmYivo+qu9bpoUsIY7aXJKvb7AXe70civYScJJpzml32/pGo qe8QHicr9T9QvrqCDdLV6UHJ6uDc9dp2agf50WZwQEGRYgrvfkO5EmIRIlPZK8oDCm 1fBHB9UhRfEXwgoeZNbB1slzhVj8SnXb52hTdu53jNWrfHzML4lmriYTdr6WeCg2Pj bViRTE8ys2wXmXa04ajb5EC423TsCWglNfszCVN6u89jqyx7gI97eU+0nP4z0HTMkD tj/AJae0GwGtg== From: SeongJae Park To: James Clark Cc: sj@kernel.org, linux-perf-users@vger.kernel.org, peterz@infradead.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa Subject: Re: [PATCH] perf: Fix missing raw data on tracepoint events Date: Mon, 17 Oct 2022 23:38:09 +0000 Message-Id: <20221017233809.1476-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221012143857.48198-1-james.clark@arm.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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 Wed, 12 Oct 2022 15:38:57 +0100 James Clark wrote: > Since commit 838d9bb62d13 ("perf: Use sample_flags for raw_data") > raw data is not being output on tracepoints due to the PERF_SAMPLE_RAW > field not being set. Fix this by setting it for tracepoint events. I was also getting similar issue[1], and confirmed that this fixes it. Thank you for the fix! Also, thank you for pointing me to this patch, Namhyung! > > This fixes the following test failure: > > perf test "sched_switch" -vvv > > 35: Track with sched_switch > --- start --- > test child forked, pid 1828 > ... > Using CPUID 0x00000000410fd400 > sched_switch: cpu: 2 prev_tid -14687 next_tid 0 > sched_switch: cpu: 2 prev_tid -14687 next_tid 0 > Missing sched_switch events > 4613 events recorded > test child finished with -1 > ---- end ---- > Track with sched_switch: FAILED! > > Fixes: 838d9bb62d13 ("perf: Use sample_flags for raw_data") > Cc: Namhyung Kim > Cc: Peter Zijlstra (Intel) > Signed-off-by: James Clark Tested-by: SeongJae Park [1] https://lore.kernel.org/bpf/20221017192744.1403-1-sj@kernel.org/ Thanks, SJ > --- > kernel/events/core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/events/core.c b/kernel/events/core.c > index b981b879bcd8..824c23830272 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -9759,6 +9759,7 @@ void perf_tp_event(u16 event_type, u64 count, void *record, int entry_size, > > perf_sample_data_init(&data, 0, 0); > data.raw = &raw; > + data.sample_flags |= PERF_SAMPLE_RAW; > > perf_trace_buf_update(record, event_type); > > -- > 2.28.0