From: Ming Z. <mi...@el...> - 2005-08-16 12:13:45
|
cool. thx. later that day i used similar step to get a good call graph. something like this. CPU: P4 / Xeon with 2 hyper-threads, speed 3391.74 MHz (estimated) Counted GLOBAL_POWER_EVENTS events (time during which processor is not stopped) with a unit mask of 0x01 (mandatory) count 100000 samples % image name app name symbol name ------------------------------------------------------------------------------- 1701 0.1020 vmlinux vmlinux copy_from_user 4375 0.2623 vmlinux vmlinux __generic_file_aio_write_nolock 1661536 99.6227 vmlinux vmlinux generic_file_buffered_write 1647498 5.9225 vmlinux vmlinux __copy_from_user_ll 1647498 100.000 vmlinux vmlinux __copy_from_user_ll [self] ------------------------------------------------------------------------------- 45313 100.000 tg3.ko tg3 tg3_start_xmit 1198501 4.3084 tg3.ko tg3 tg3_start_xmit 1198501 94.3050 tg3.ko tg3 tg3_start_xmit [self] 45313 3.5655 tg3.ko tg3 tg3_start_xmit 7196 0.5662 tg3.ko tg3 tg3_set_txd 5535 0.4355 vmlinux tg3 sub_preempt_count 4837 0.3806 vmlinux tg3 common_interrupt 3408 0.2682 vmlinux tg3 apic_timer_interrupt 1818 0.1431 vmlinux tg3 _spin_unlock_irqrestore 1431 0.1126 vmlinux tg3 add_preempt_count ------------------------------------------------------------------------------- 7320 0.6746 oprofiled oprofiled opd_put_sample 195494 18.0170 oprofiled oprofiled sfile_log_sample 882238 81.3084 oprofiled oprofiled sfile_log_arc 1078682 3.8777 oprofiled oprofiled odb_insert 1078682 99.9818 oprofiled oprofiled odb_insert [self] ------------------------------------------------------------------------------- 2910851 100.000 tg3.ko tg3 tg3_poll 1056230 3.7970 tg3.ko tg3 tg3_rx 1545577 49.6682 vmlinux tg3 netif_receive_skb 1056230 33.9427 tg3.ko tg3 tg3_rx [self] 257219 8.2659 tg3.ko tg3 tg3_alloc_rx_skb 234289 7.5290 vmlinux tg3 eth_type_trans 4072 0.1309 vmlinux tg3 sub_preempt_count 3851 0.1238 vmlinux tg3 ip_rcv On Tue, 2005-08-16 at 15:50 +0800, Lv Zheng wrote: > You are welcome, but your data seems not containing backtrace > informations. only samples marked 'self' are generated. > I think you should confirm following things, these will cause the > callgraph data missing problem: > > 1. make sure your kernel is compiled with "framepointer" enabled > 2. make sure callgraph depth is set with none-zero value > `cat /dev/oprofile/backtrace_depth` > you can do this by opcontrol --callgraph=5 after executing > opcontrol --vmlinux=XX (pay attention to the command sequence, > vmlinux must be set first) > 3. make sure you are not using an ARM kernel together with > oprofile-0.9.0 (a bug fix can be found in 0.9.1) > 4. use opreport -c to generate callgraph data for you samples. > > following is a sample for oprofile callgraph usage: > > VMLINUX="/vmlinux" > BACKTRACE=5 > VERSION=`uname -r` > > opcontrol --shutdown &> /dev/null > opcontrol --init > opcontrol --reset > opcontrol --vmlinux=${VMLINUX} > opcontrol --callgraph=${BACKTRACE} > opcontrol --separate=kernel > opcontrol --event=GLOBAL_POWER_EVENTS:533333:1:1:1 > opcontrol --start > # run something here > opcontrol --dump > opcontrol --shutdown > opreport -c -l -o myreport_${VERSION}_${i}_${j} > > Best regards > > ----- Original Message ----- > From: "Ming Zhang" <mi...@el...> > To: "Lv Zheng" <zh...@sh...> > Cc: "oprofile" <opr...@li...> > Sent: Monday, August 15, 2005 8:46 PM > Subject: Re: how to explain the call graph > > > > thanks a lot. i found it. > > > > i assumed opstack could give me this. but seems opreport --callgraph is > > for this. > > > > Ming > > > > On Mon, 2005-08-15 at 09:58 +0800, Lv Zheng wrote: > > > Hi, Ming > > > > > > Make sure following configuration items enabled for your kernel > > > then run oprofile --callgraph again. > > > > > > oprofile: > > > Profiling support > > > -> Profiling support > > > -> OProfile system profiling > > > frame pointers: > > > Kernel hacking > > > -> Kernel debugging > > > -> Compile the kernel with frame pointers > > > > > > Best regards > > > > > > ----- Original Message ----- > > > From: "Ming Zhang" <mi...@el...> > > > To: "oprofile" <opr...@li...> > > > Sent: Friday, August 12, 2005 2:40 AM > > > Subject: how to explain the call graph > > > > > > > > > > I wonder how to explain this call graph output. > > > > > > > > i have oprofile configured as this > > > > > > > > [root@sc420 root]# opcontrol --status > > > > Daemon running: pid 3469 > > > > Separate options: library kernel > > > > vmlinux file: /usr/src/linux-2.6.12.3/vmlinux > > > > Image filter: none > > > > Call-graph depth: 5 > > > > > > > > then i ran this to get file x. > > > > > > > > opreport -t0.1 -l -c -p /lib/modules/2.6.12.3/kernel/ -o x > > > > > > > > for example, i saw this schedule take 5%. but then how can i tell who > > > > and where this schedule() is called? > > > > > > > > > -------------------------------------------------------------------------- > > > ----- > > > > 54820 5.6787 vmlinux vmlinux > > > > schedule > > > > 54820 100.000 vmlinux vmlinux > > > > schedule [self] > > > > > > > > > > > > thanks a lot! > > > > > > > > Ming > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > > _______________________________________________ > > oprofile-list mailing list > > opr...@li... > > https://lists.sourceforge.net/lists/listinfo/oprofile-list > |