Wireshark mailing list archives
Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c
From: Jakub Zawadzki <darkjames-ws () darkjames pl>
Date: Tue, 15 Oct 2013 20:34:25 +0200
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 ;|
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? #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 () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c Maynard, Chris (Oct 14)
- Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c Anders Broman (Oct 14)
- Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c Jakub Zawadzki (Oct 15)
- <Possible follow-ups>
- Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c Maynard, Chris (Oct 15)
- Re: [Wireshark-commits] rev 52608: /trunk/epan/dissectors/ /trunk/epan/dissectors/: packet-vlan.c Anders Broman (Oct 14)