Re: function profiling with set_ftrace_pid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Aug 2014 10:54:35 -0700
Brendan Gregg <brendan.d.gregg@xxxxxxxxx> wrote:

> G'Day,
> 
> Not sure this is the right place to send ftrace feature requests (or
> if I should try to send patches instead), so please redirect me if
> needed...
> 
> Function profiling is great. Is there a way to filter by PID?
> set_ftrace_pid doesn't seem to work:
> 
> # echo nop > current_tracer
> # echo $$ > set_ftrace_pid
> # echo 0 > function_profile_enabled
> # echo 1 > function_profile_enabled
> # head trace_stat/function0
>   Function                               Hit    Time            Avg
>          s^2
>   --------                               ---    ----            ---
>          ---
>   ext4_evict_inode                       358    501550.3 us
> 1400.978 us     4247547 us
>   ext4_mark_inode_dirty                 6951    92433.96 us     13.297
> us       2423567 us
>   ext4_reserve_inode_write              7738    86654.82 us     11.198
> us       711959.6 us
>   ext4_file_write_iter                   348    81828.82 us
> 235.140 us      971130.5 us
>   ext4_dirty_inode                      1178    77598.27 us     65.872
> us       294410.3 us
>   ext4_da_write_end                      348    76089.57 us
> 218.648 us      966750.6 us
>   ext4_rename                            357    40821.26 us
> 114.345 us      160818.4 us
>   ext4_alloc_da_blocks                   357    34260.99 us     95.969
> us       160912.0 us
> 
> Is it possible that set_ftrace_pid could support function profiling?
> 

Hmm, it should have worked. What kernel did you try it on.

I just found out that there's a bug in the code that was added in 3.16
with function profiling. I'm working on fixing that now.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-trace-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux