Questions tagged [ftrace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

trace-cmd report fails with Buffer overflow error

I have started looking into tracing events using trace-cmd # trace-cmd record -p function -e all ls CPU0 data recorded at offset=0x5f1000 987136 bytes in size CPU1 data recorded at offset=0x6e2000 ...
0
votes
0answers
29 views

Reading trace_pipe fast and in a certain time span with ftrace

I am new to all the Linux stuff and I am sorry if my question is a bit dumb. The documentation on ftrace is mostly for pretty advanced users and there's not that much information on ftrace in general. ...
0
votes
0answers
39 views

Using ftrace in linux to understand nvme linux driver

I am new to linux. I am trying to use ftrace to understand linux nvme driver code flow. Based on articles in net, once my nvme device is mounted, I am issuing following commands to get the trace cd /...
0
votes
0answers
41 views

Is there a way to dereference pointers and parse structs using ftrace?

I would like to be able to get the source IP of a peer that connects to a server on my machine. My way of doing so is by enabling the sys_enter_accept tracepoint event. The problem is that I cannot ...
1
vote
0answers
22 views

How to get the cpu number of a trace event in a custom probe function?

I am registering a probe function for trace events using a Kernel module. For eg the probe function for the trace event sched_kthread_stop would be: void handle_kthread_stop(void *data, struct ...
0
votes
0answers
28 views

How to use trace-cmd with wpa_supplicant?

I want to trace the function calls (of the wpa_supplicant source) when I connect to wireless network with wpa_supplicant. I have built wpa_supplicant with CONFIG_DEBUG_LINUX_TRACING option from ...
0
votes
0answers
168 views

KernelShark BufferOverflow error for trace-cmd with “all” option

I have a simple helloworld program which prints "hello" on to the console. I have installed trace-cmd and when I run, trace-cmd record -e syscalls -F ./a.out and trace-cmd report, I get the entire ...
2
votes
1answer
19 views

Multiple Tracing Events Readers

Question Does the tracing pipes in Linux, for tracing events, accepts simultaneous readers? Context I am trying to get traces from the RAS subsystem while running some benchmarks. This subsystem ...
2
votes
0answers
81 views

Linux task state different in /proc/pid/stat compared to Ftrace output of sched events

I'm trying to trace the flow of a piece of code just to understand the points where the tasks go into D/S/R states (uninterruptible/interruptible/running). I do understand the meaning of each state, ...
1
vote
1answer
73 views

How can I send dmesg printout to ftrace subsystem?

How can I send dmesg printout to ftrace subsystem? I like correlate the dmesg msg with the functions call graph in ftrace. Thanks
1
vote
1answer
191 views

How writing in debugfs controls ftrace?

Ftrace is controlled by manipulating the debug fs files. But how is it possible ? How kernel be aware of writing in this files and start its required actions?for exmple if 1 is written to tracing_on , ...
5
votes
1answer
557 views

Change format of syscall event trace output to ftrace

I enabled ftrace event tracing for sys_enter_openat syscall. The respective output format given at events/syscalls/sys_enter_openat/format is print fmt: "dfd: 0x%08lx, filename: 0x%08lx, flags: 0x%...
0
votes
1answer
40 views

Performance reduction activating trace-functionality in kernel

Is there any performance reduction to be expected from just activating trace (ftrace) functionality in the Linux kernel, but not using it at run time?
0
votes
1answer
100 views

functions folder in trace_stat folder of ftrace

I am learning ftrace, I read from the following link that I can enable function profiling using the 'function_profile_enabled' file. mount -t tracefs nodev /sys/kernel/tracing cd /sys/kernel/tracing ...
1
vote
0answers
432 views

how to use ftrace to function_trace a kernel modules interrupt?

I have a Banana Pi Arm device with 2 cores (1.2 GHz) running a Debian kernel which I enabled ftrace kernel debug options. I want to determine the amount of time spent in a kernel module function. The ...
2
votes
0answers
190 views

Tool for displaying timeline view of kernel/userspace execution trace

I've used the ftrace tool trace-cmd for recording scheduling tracepoints and syscall tracepoints. I can inspect them visually using the kernelshark GUI program. It dislays per-core timelines and per-...
1
vote
0answers
45 views

PMU and tracepoints

I am searching for information about the mechanism of creation of tracepoints. From this topic What are Kernel PMU event-s in perf_events list? and this blog brendangregg I've got that tracepoints are ...
1
vote
0answers
178 views

Function profiling on multi-core platform for specific PID using ftrace

I'm trying to use ftrace for function profiling based on function_profile_enabled as described here. I would like to capture function calls only for a certain PID using set_ftrace_pid as described in ...
2
votes
1answer
200 views

Ftrace time duration

I echoed 1 to tracing_on in /sys/kernel/debug/tracing directory and echoed 0 again after a second. However, the timestamp of the first entry is 216.852 and that of the last entry is 234.136 giving me ...
2
votes
1answer
1k views

ftrace not working? Probably a simple mistake

I am trying to monitor the function pci_bus_write_config_byte. I have a kernel module that I know for certain calls that function. echo "pci_bus_write_config_byte" > set_ftrace_filter Then I did ...
0
votes
1answer
1k views

How to get epoch time with trace-cmd (frontend for ftrace)?

<...>-32578 [001] **133767.868869**: kfree: call_site=ffffffff810e6f06 ptr=(nil) How to make trace-cmd report time in epoch time? The time by default is I think time since ...
8
votes
1answer
3k views

filter out certain processes and/or pids in ftrace?

I'm not sure if I'm thinking about this the right way (and please correct me if I'm wrong), but the following is my understanding of ftrace. In /sys/kernel/debug/tracing, there are the following ...