Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:codeviz [2008/11/18 18:57] mdc |
doc:codeviz [2008/11/19 08:25] (current) mdc |
||
---|---|---|---|
Line 16: | Line 16: | ||
{{:doc:rtl8169_process_rx_packets.png?800|call graph example}} | {{:doc:rtl8169_process_rx_packets.png?800|call graph example}} | ||
+ | |||
+ | The function name is in the rectangular box on the left, and all the functions that are called flow to the right. I have limited the display to 3 levels of depth for presentation purposes. | ||
===== Installation Procedure ===== | ===== Installation Procedure ===== | ||
Line 67: | Line 69: | ||
===== Creating nice call graphs ===== | ===== Creating nice call graphs ===== | ||
- | To make a nice call graph of ''rtl_open for instance'', we can do: | + | To make a nice call graph of ''rtl8169_poll for instance'', we can do: |
$ gengraph -f rtl8169_poll -d 3 output-font=Arial --output-layout LR --plain | $ gengraph -f rtl8169_poll -d 3 output-font=Arial --output-layout LR --plain | ||
- | This does a call graph of the function rtl8169_open, depth 3, left-to-right orientation, and requests that output be saved for input to the ''dot'' program. | + | This does a call graph of the function rtl8169_poll, depth 3, left-to-right orientation, and requests that output be saved for input to the ''dot'' program. |
''dot'' is the program that renders the outupt from gengraph: | ''dot'' is the program that renders the outupt from gengraph: | ||
- | $ dot -Gcenter=1 -Gsize=11,8.5 -Gmargin=.333 -Tps -o rtl8169_poll.ps < rtl8169_poll.plain | + | $ dot -GPAPERSIZE=letter -Gsize=8,10.5 -Gcenter=1 -Gmargin=.25 -Tps -o rtl8169_poll.ps < rtl8169_poll.plain |
- | ''dot'' draw the call graph according to the instructions in the ''.plain'' file, and outputs a file in whatever -T says (postscript in this case. png is also popular). | + | ''dot'' draws the call graph according to the instructions in the ''.plain'' file, and outputs a file in whatever -T says (postscript in this case. png is also popular). |
We can also request a ''.pdf'' be created from the ''.ps'' file using ''ps2pdf'': | We can also request a ''.pdf'' be created from the ''.ps'' file using ''ps2pdf'': | ||
- | $ ps2pdf rtl_poll.ps | + | $ ps2pdf rtl8169_poll.ps |
===== Automating the process ===== | ===== Automating the process ===== | ||