lkml.org 
[lkml]   [2008]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RESEND] ftrace: Add a script to produce a hierarchical view of a function trace


On Sun, 26 Oct 2008, Frederic Weisbecker wrote:

> This script parses a function trace and then produces a hierarchical view of the
> function call stack after processing it into a tree.
>
> You can see the result on attachment. You will find the raw trace and the hierarchical view.

Very nice and useful tool!

Just one thing...

>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> diff --git a/scripts/draw_functrace.py b/scripts/draw_functrace.py
> new file mode 100755
> index 0000000..e6496bd
> --- /dev/null
> +++ b/scripts/draw_functrace.py
> @@ -0,0 +1,119 @@
> +#!/usr/bin/python
> +
> +"""
> +Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
> +Licensed under the terms of the GNU GPL License version 2
> +
> +This script parses a trace provided by the function tracer in
> +kernel/trace/trace_functions.c
> +The resulted trace is processed into a tree to produce a more human
> +view of the call stack by drawing textual but hierarchical tree of
> +calls. Only the functions's names and the the call time are provided.
> +
> +Usage:
> + Be sure that you have CONFIG_FUNCTION_TRACER
> + # mkdir /debugfs
> + # mount -t debug debug /debug
> + # echo function > /debug/tracing/current_tracer
> + # cat /debug/tracing/current_tracer > ~/raw_trace_func

Do you really mean to write "function" into ~/raw_trace_func?

Also, I just tried this out (replacing current_tracer with trace) and I
just get ---Root (Nowhere)

-- Steve

> + Wait some times but not too much, the scripts is a bit slow.
> + Break the pipe (Ctrl + Z)
> + $ scripts/draw_functrace.py < raw_trace_func > draw_functrace
> + Then you have your drawn trace in draw_functrace
> +"""
> +


\
 
 \ /
  Last update: 2008-10-27 00:13    [W:0.046 / U:1.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site