Print callgraph of a function

Sometimes you may want to see what functions are called in a function in multiple level. Below command in my extension may help.

crash> edis -c irq_exit
{irq_exit} -+- {rcu_irq_exit} -+- {warn_slowpath_null} 
            |- {idle_cpu} 
            |- {tick_nohz_stop_sched_tick} -+- {ktime_get} 
            |                               |- {update_ts_time_stats} 
            |                               |- {sched_clock_idle_sleep_event} 
            |                               |- {rcu_needs_cpu} 
            |                               |- {select_nohz_load_balancer} 
            |                               |- {rcu_enter_nohz} 
            |                               |- {tick_program_event} 
            |                               |- {ktime_get} 
            |                               |- {tick_do_update_jiffies64} 
            |                               |- {raise_softirq_irqoff} 
            |                               |- {timekeeping_max_deferment} 
            |                               |- {printk_needs_cpu} 
            |                               |- {get_next_timer_interrupt} 
            |                               |- {hrtimer_start} 
            |                               |- {printk} 
            |                               `- {hrtimer_cancel} 
            `- {do_softirq} -+- {call_softirq} 
                             `- {warn_slowpath_null} 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.