This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to use gprof in wireshark development.

0

I'm development on the wireshark1.8.5.

I have to find the function which cost a lot of time when wireshark is running.

Thanks!

asked 28 Feb '13, 18:34

smilezuzu's gravatar image

smilezuzu
20323237
accept rate: 0%

or how to use performance profile on vs2010 to find out ?

(28 Feb '13, 18:36) smilezuzu

If you are using Linux, you could do 'valgrind --tool=callgrind --trace-children=yes ./wireshark' then afterwards browse the biggest of the resulting callgrind files using kcachegrind.

(28 Feb '13, 18:59) MartinM

One Answer:

0

On Linux:

Unpack the source code and run configure with the option --enable-profile-build.

./configure --enable-profile-build

Then run Wireshark and do whatever you want to test.

Exit Wireshark and run the following command from the source directory.

libtool --mode=execute gprof wireshark gmon.out

Regards
Kurt

answered 14 Jun '13, 11:16

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%