Questions tagged [ftrace]

Ftrace is an internal tracing utility built directly into the Linux kernel. It can be used for debugging or analyzing latencies and performance issues that take place outside of user-space.

Ftrace is an internal tracer designed to help out developers and designers of systems to find what is going on inside the Linux kernel. Ftrace was derived from two preceding tools: the "latency tracer" by Ingo Molnar and the "logdev" utility by Steven Rostedt. It can be used for debugging or analyzing latencies and performance issues that take place outside of user-space.

Ftrace also includes a plugin infrastructure that allows for other types of tracing. Tracers available in ftrace through plugins allow tracing such events as:

  • context switches
  • the time it takes for a high priority task to run after it was woken up
  • the amount of time for which interrupts are disabled

123 questions
0
votes
1 answer

Empty memory use by ftrace?

ftrace uses memory to keep the trace record. Before starting a new trace, the old traces are still kept in the memory by ftrace has to be emptied. How can this be done?
Mayuran
  • 669
  • 2
  • 8
  • 39
0
votes
1 answer

kprobe modules cannot work after execute "echo 0 > /proc/sys/kernel/ftrace_enabled "

Just do some research of ftrace. TCP echo program is running between two host. When I shutdown the big switch(echo 0 > /proc/sys/kernel/ftrace_enabled ), my own kprobe module cannot work also. The printk message cannot be seen in the kernel log…
Mean Chou
  • 1
  • 3
0
votes
1 answer

How to get trace-cmd report based on a network interface name(Eg: eth2)?

Is there any way to filter out trace-cmd report based on network interface name (Eg: eth1 or eth2) ? When i try to use "name" as EVENT_FIELD in trace-cmd report filter i get nothing. Following is the command i used [prap4test]$trace-cmd report -F…
prap4search
  • 5
  • 1
  • 4
0
votes
1 answer

How can the ftrace support hook function

Is it possible to hook/callback kernel function to my kernel module by ftrace or anyway. for example: I want hook each time the function net_tx_action() called to my module, included arguments. regards peter
Robber Pen
  • 1,033
  • 2
  • 12
  • 24
0
votes
1 answer

What is the Ftrace front-end in Arch Linux?

In Arch Linux, I want to use the trace-cmd, the front-end of Ftrace. But unfortunately, it doesn't exist: # pacman -S trace-cmd error: target not found: trace-cmd I try to find in Arch Linux package site, still no result. So is there any…
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
0
votes
0 answers

Printing leaf function in single line in a set of nested functions

I have a set of nested functions like in kernel source. I need to print parent function with opening and closing curly braces, and leaf function in a single line with semicolon similar to ftrace graph tracer. I have the current function 's name but…
Ivid
  • 203
  • 3
  • 10
0
votes
1 answer

how to use ftrace to track linux fair (scheduler) process

I'm working on a project on CFS. Using Ftrace to track the whole path of fair process in Linux. According to documentation https://lwn.net/Articles/370423/. [tracing]# echo $$ > set_ftrace_pid I can track the specific process with process pid. But…
0
votes
1 answer

Fail to initialize ftrace in MAKO

I am trying to use ftrace in MAKO (Nexus 4) With android-msm-mako-3.4-lollipop-release branch from msm.git, I just added below configuration in…
Potato
  • 23
  • 6
0
votes
1 answer

Make linux kernel function show in ftrace available_filter_function

I want to trace perf_event_open using ftrace but it does not show in available_filter_function. In fact, it seems that only functions loaded in modules are shown. Is there a default blacklist for non-module functions? how to add the function I need?
papirrin
  • 2,004
  • 22
  • 30
0
votes
1 answer

Kprobe: associate return probe with entry probe

I'd like to trace writes on a specific file, so I've had the idea that I could do this: I create a probe on do_sys_open, if the filename argument matches the pattern I'm looking for I use a trigger to enable a return probe that fetches the returned…
replay
  • 3,569
  • 3
  • 21
  • 30
0
votes
1 answer

UDP latency measurement for Linux using ftrace

I need to measure the latency between a single UDP packet arriving on a Ethernet port (i.e. interrupt generated) and the time this packet is delivered to the user-level (i.e. the read() syscall unblocked). This time can be measured by timestamping…
Claudio
  • 10,614
  • 4
  • 31
  • 71
0
votes
0 answers

How do I prevent task/process name from being trimmed in Systrace or atrace kernel log output?

How do I ensure the task name/process name in kernel log outputs from Systrace/atrace don't get trimmed or cut off? I want to see the whole name of the task/process name without it get shortened. Below is an example of Systrace output without the…
Zythyr
  • 1,142
  • 4
  • 20
  • 33
0
votes
1 answer

ftrace: Is there any way to view my trace with kernelshark without using trace-cmd?

I have been using ftrace to trace and time a boot process on my machine. I don't know of any way to start trace-cmd early enough to catch the things I need to see, whereas with ftrace, I just enable it before I reboot, then disable after I've…
Overdr0ne
  • 17
  • 4
0
votes
1 answer

Nonblocking read from a pipe in Linux

I would like to read /sys/kernel/debug/tracing/trace_pipe in non-blocking way using Linux command-line tools. For instance, cat cannot be used, because it will be blocked. This is similar to this, with the difference that I don't want to use Python.
Javad
  • 313
  • 3
  • 13
0
votes
0 answers

systrace output html only has cpu row

following picture is my systrace output, there is only one row. Comparing the html with some sample file, it seems in my file, there is no lines like SurfaceFlinger-220 [001] 227112.684875: 0: B|129|onMessageReceived\n\ SurfaceFlinger-220 …
bright
  • 137
  • 1
  • 3
  • 11
1 2 3
8
9