Message ID | 20230419214140.4158-1-beaub@linux.microsoft.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp682461vqo; Wed, 19 Apr 2023 14:45:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bN3rHYUToME7bgm8oRwCigmA5UmyEmSwBoGDn7Aoo5H80P0Q0dbS017PtdKYLdYLuUZ5Ya X-Received: by 2002:a05:6a00:2d89:b0:63b:88f6:3817 with SMTP id fb9-20020a056a002d8900b0063b88f63817mr5979894pfb.19.1681940748120; Wed, 19 Apr 2023 14:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681940748; cv=none; d=google.com; s=arc-20160816; b=S7j4NC8qDGQTmcDCpVNVAhUD3/x3ZUvmM5pCfym9uRLyOs/WLECFDCJqT+EH3lgWzz ROXxAhxRXjOhbftqAlzP27xLvNUcSt6YCfZ1MyhkDHLmAOvlBf9Tjn5G1eOnMhlFJi9w y25G2YjTzW2MmUV+bGb9iZZIJgCUUeCcnjJueht1eHXWAhl6L+zSieovJmJqOESblo3p W42Q6VlJH72sZZItKo1rnMbCTAnIcUBVNE7Yj0HtxxqSJm8FCYdjdYi9xkZrHlDpnSgF IWw2nWgJx3Jt614SRPX/n5rZxGR246hxjF23SytGHnhEes+f5GV39RvugeZ/bCyVCQek qc5g== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=sgTNp5eSBPHwEMtDp0lZS2PRQR1YHnD6Cy4riRcqsQk=; b=ztkd73gcVohsQLaALycvnrJK0ozWlGPrcBiwiVvybW92AUTrdD/1bhhexKDFAe1IcV cJKeSqm59uvP6TsInNZ8tvz08mPUw3BaASEGnA9CWageqtF/Xtn9AoAurukR3QQLJs+p DrRVmcV268Sv2VzO301SEa5E5zmodDiN0RT2QuaEZVrpeQguTXf5FzUFFqjJLAW50EQG 9more9dq+VgVGM8TWe9yPJ2RGaDMQRbTs+AmlMmtKtU407+ca82G2fmto/dxwyTqO0rX 6aDmo5/9ptJHkdX1/ZI9WlcI60WRKweiP+fmGeC0OIi6oY1AizIkCnNZwkwCpD4QtEFO rxOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=cb+7k6it; 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=linux.microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020aa78e8d000000b00639d66c8fbcsi17534756pfr.118.2023.04.19.14.45.36; Wed, 19 Apr 2023 14:45:48 -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=@linux.microsoft.com header.s=default header.b=cb+7k6it; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231175AbjDSVlv (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Wed, 19 Apr 2023 17:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjDSVlt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 19 Apr 2023 17:41:49 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E30221736; Wed, 19 Apr 2023 14:41:48 -0700 (PDT) Received: from W11-BEAU-MD.localdomain (unknown [76.135.27.212]) by linux.microsoft.com (Postfix) with ESMTPSA id 34BFB21C204E; Wed, 19 Apr 2023 14:41:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 34BFB21C204E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681940508; bh=sgTNp5eSBPHwEMtDp0lZS2PRQR1YHnD6Cy4riRcqsQk=; h=From:To:Cc:Subject:Date:From; b=cb+7k6itM4fiMWaLmgo4Zo0Hly8Ap/5mT/nDt7SLnLDnCUMgqe/PZKgMly3poSdgH 0MDDKOMZtnR0HFAmAGH1Oa7khXXoHBzeArfUlQMj/e6gx6yA8nTjpZ5JmfutxxuwcP vXuo9E1CSnnv/T8GbPgihZNCGUE8O8tSNb4LfojA= From: Beau Belgrave <beaub@linux.microsoft.com> To: rostedt@goodmis.org, mhiramat@kernel.org, dcook@linux.microsoft.com, alanau@linux.microsoft.com Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [PATCH 0/2] tracing: Fix print_fields() and use best filter Date: Wed, 19 Apr 2023 14:41:38 -0700 Message-Id: <20230419214140.4158-1-beaub@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763642701857503614?= X-GMAIL-MSGID: =?utf-8?q?1763642701857503614?= |
Series |
tracing: Fix print_fields() and use best filter
|
|
Message
Beau Belgrave
April 19, 2023, 9:41 p.m. UTC
When using user_events along with the new print_fields() functionality a few issues were discovered. When printing out fields, the __rel_loc field types were printing out the wrong array values. Also, user_events wasn't setting the best filter type, so __rel_loc data was marked as FILTER_OTHER vs FILTER_RDYN_STRING when chars were used. This resulted in strings being printed out as array of bytes vs a string. After applying this series user_events will output strings correctly for __rel_loc via /sys/kernel/tracing/trace outputs. All events that utilize print_fields() will print the correct array/string for __data_loc and __rel_loc data, when it's enabled. Beau Belgrave (2): tracing/user_events: Set event filter_type from type tracing: Fix print_fields() for __dyn_loc/__rel_loc kernel/trace/trace_events_user.c | 3 +++ kernel/trace/trace_output.c | 10 ++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) base-commit: 88fe1ec75fcb296579e05eaf3807da3ee83137e4