[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1668601492-4242-1-git-send-email-chensong_2000@189.cn>
Date: Wed, 16 Nov 2022 20:24:52 +0800
From: Song Chen <chensong_2000@....cn>
To: rostedt@...dmis.org, mhiramat@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
Song Chen <chensong_2000@....cn>
Subject: [PATCH 0/4] move functions in trace_probe_tmpl.h to trace_probe.c
Below fucntions are defined and implemented in kprobe/eprobe/uprobe
respectively:
1. store_trace_args
2. print_probe_args
3. __get_data_size
4. process_fetch_insn
5. process_fetch_insn_bottom
6. fetch_store_*
7. probe_mem_*
...
They are either identical or similar, which means there is some space to
optimize code organization.
This patchset would like to move them into trace_probe.c as new APIs to
serve those probes and the differences will be merged at the same time.
It improves readability and avoid involving errors while adding a new
feature.
Song Chen (4):
kernel/trace: Introduce new APIs to process probe arguments
kernel/trace/kprobe: Use new APIs to process kprobe arguments
kernel/trace/eprobe: Use new APIs to process eprobe arguments
kernel/trace/uprobe: Use new APIs to process uprobe arguments
kernel/trace/trace_eprobe.c | 194 +------------------
kernel/trace/trace_kprobe.c | 125 +-----------
kernel/trace/trace_probe.c | 310 ++++++++++++++++++++++++++++++
kernel/trace/trace_probe.h | 11 ++
kernel/trace/trace_probe_common.h | 69 +++++++
kernel/trace/trace_probe_user.h | 108 +++++++++++
kernel/trace/trace_uprobe.c | 177 +----------------
7 files changed, 518 insertions(+), 476 deletions(-)
create mode 100644 kernel/trace/trace_probe_common.h
create mode 100644 kernel/trace/trace_probe_user.h
--
2.25.1
Powered by blists - more mailing lists