Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trun

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Wed, 16 Oct 2013 08:42:30 +0000

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Jakub Zawadzki
Sent: den 15 oktober 2013 20:34
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c

On Tue, Oct 15, 2013 at 07:19:34AM +0200, Anders Broman wrote:
>> Maynard, Chris skrev 2013-10-15 00:47:
>> > Why not add a fence so it's always visible then?
>> 
>> My point is that I don't want to write column info in the VLAN 
>> dissector to speed up dissection. If it could be arranged to only 
>> write the "last" entry that will actually be in the packet list or 
>> written out by tshark it would be much more efficient.
>
>I was looking on it yesterday, with libffi (nice portable library!) it seems to be possible to call variadic functions (read: g_snprintf) with custom arguments. >We need to cache format and arguments and we could do it.
>
>Right time no time ;|

Sounds interesting

>> In the reference trace I'm pursuing col_add_fstr() costs 7.52 is 
>> called
>> 4,7 million times, where of 2.8 million times is from the VLAN dissector.
>
>I'm not sure if it helps, but I micro-optimized print_columns() removing g_snprintf() & g_strlcat() [hope that I keep tshark output the same] in r52625.
>
>Looking at callgrind output of some capture file of yours (TCA_SIP_performance.pcap) these calls costs 4,8M.
>I hope we saved about 1-2G Ir by calling just memcpy(), could you please check in some free time?

Also looks good see the new callgrind output. Thanks!

#v+
10,589,960,094  * /home/ericsson/ewireshark/trunk/tshark.c:print_packet
 3,830,250,718  >   ???:g_snprintf (5743212x)  [/lib/x86_64-linux-gnu/libglib-2.0.so.0.3600.0]
 1,073,058,165  >   ???:g_strlcat (12922227x)  [/lib/x86_64-linux-gnu/libglib-2.0.so.0.3600.0]
#v-

P.S Thanks for reverting packet-vlan.c
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe

Attachment: callgrind.out.23509.bz2
Description: callgrind.out.23509.bz2