tracing: Show real address instead of hashed pointer
Get series with b4
b4 am 160277369795.29307.6792451054602907237.stgit@devnote2Versions newest first · linked by author and title
- v3 Latest3 patches 7 repliesIn review
- v2 RFC3 patches 2 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tracing: Show real address for trace event argumentsinclude/ include/ kernel/ +2 more | +88 | 3 replies | |
| 2/3 | tracing: Update the stage 3 of trace event macro commentinclude/ | +20 | 0 replies | |
| 3/3 | tracing: Add ptr-hash option to show the hashed pointer valueDocumentation/ kernel/ kernel/ | +10 | 2 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by.
| Patch | Jon Hunter |
|---|---|
| 1/3 | T-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] tracing: Show real address instead of hashed pointer
Hi,
Here is the 3rd version of the series for real address printing in trace log.
Here is the previous version, I've fixed [1/3] to use krealloc(), fix memory allocation error check and add __printf() attribute, according to Steve's comment.
https://lore.kernel.org/lkml/160275239876.115066.10891356497426857018.stgit@devnote2/
Since trace_seq_printf() use in-kernel vsprintf() at last, the %p is always converted to the hash value instead of real address.
For the dmesg it maybe secure, but for the ftrace, I think it is meaningless because
- tracefs is used by root user, so no need to hide it.
- tracefs user can access percpu/cpu*/trace_pipe_raw which stores real address on the trace buffer.
- external commands like perf doesn't convert to the hash value.
And when debugging kernel, we would like to know real address which tells us the address is in which area in the kernel by comparing with kernel memory mapping.
However, to compare the trace log with dmesg, we also need a bridging information. So 3/3 gives the options/hash-ptr knob which switches the output format.
Thank you,
---
Masami Hiramatsu (3):
tracing: Show real address for trace event arguments
tracing: Update the stage 3 of trace event macro comment
tracing: Add ptr-hash option to show the hashed pointer value
Documentation/trace/ftrace.rst | 6 +++ include/linux/trace_events.h | 4 ++ include/trace/trace_events.h | 31 +++++++++++------ kernel/trace/trace.c | 74 +++++++++++++++++++++++++++++++++++++++- kernel/trace/trace.h | 3 ++ kernel/trace/trace_output.c | 12 ++++++ 6 files changed, 118 insertions(+), 12 deletions(-)
--
Masami Hiramatsu (Linaro) <[email protected]>