From patchwork Wed Nov 23 08:01:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Song Chen X-Patchwork-Id: 13053218 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 7C070C4332F for ; Wed, 23 Nov 2022 07:56:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235874AbiKWH4e (ORCPT ); Wed, 23 Nov 2022 02:56:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236193AbiKWH4O (ORCPT ); Wed, 23 Nov 2022 02:56:14 -0500 Received: from 189.cn (ptr.189.cn [183.61.185.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9750A1AF; Tue, 22 Nov 2022 23:55:14 -0800 (PST) HMM_SOURCE_IP: 10.64.8.31:34556.651846289 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from clientip-123.150.8.42 (unknown [10.64.8.31]) by 189.cn (HERMES) with SMTP id C6443100302; Wed, 23 Nov 2022 15:55:11 +0800 (CST) Received: from ([123.150.8.42]) by gateway-153622-dep-6cffbd87dd-pzsb9 with ESMTP id a7ce1a020ff04a4085f415edf4631d51 for rostedt@goodmis.org; Wed, 23 Nov 2022 15:55:12 CST X-Transaction-ID: a7ce1a020ff04a4085f415edf4631d51 X-Real-From: chensong_2000@189.cn X-Receive-IP: 123.150.8.42 X-MEDUSA-Status: 0 Sender: chensong_2000@189.cn From: Song Chen To: rostedt@goodmis.org, mhiramat@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Song Chen Subject: [PATCH v2 0/2] reorganize trace_peobe_tmpl.h Date: Wed, 23 Nov 2022 16:01:38 +0800 Message-Id: <1669190498-2807-1-git-send-email-chensong_2000@189.cn> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-trace-kernel@vger.kernel.org Hi, In the first patchset, my intension was to remove trace_probe_tmpl.h, just keep a unified process_fetch_insn and process_fetch_insn_bottom in trace_probe.c for all *probes. is_uprobe was the most important move to approach. If it was not accepted, the whole patchset couldn't stand. Then I change my goal to at least no warnings or errors when impelenting a new feature based on trace probe if it includes trace_probe_tmpl.h by provideing default behaviors. What's more, it also removes redundant code in kprobe and eprobe. Song Chen (2): kernel/trace: Introduce trace_probe_print_args and use it in *probes kernel/trace: Provide default impelentations defined in trace_probe_tmpl.h kernel/trace/trace_eprobe.c | 146 +----------------------------- kernel/trace/trace_events_synth.c | 7 +- kernel/trace/trace_kprobe.c | 106 +--------------------- kernel/trace/trace_probe.c | 27 ++++++ kernel/trace/trace_probe.h | 2 + kernel/trace/trace_probe_kernel.h | 140 ++++++++++++++++++++++++++-- kernel/trace/trace_probe_tmpl.h | 28 ------ kernel/trace/trace_uprobe.c | 2 +- 8 files changed, 171 insertions(+), 287 deletions(-)