Wireshark-dev: Re: [Wireshark-dev] Profiling tshark
From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Mon, 9 Jun 2014 11:38:36 +0000

 

 

From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Evan Huus
Sent: den 9 juni 2014 13:29
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] Profiling tshark

 

 

On Jun 9, 2014, at 4:02 AM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

Hi,

As can be seen we have managed to make a significant improvement from 1.10.6

 

wireshark 1.10.6 (v1.10.6 from master-1.10)

==44865== Callgrind, a call-graph generating cache profiler

==44865== Copyright (C) 2002-2013, and GNU GPL'd, by Josef Weidendorfer et al.

==44865== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info

==44865== Command: /usr/bin/tshark -Y frame -nr /home/ericsson/etxrab/TCT_SIP_traffic.pcapng

==44865==

==44865== For interactive control, run 'callgrind_control -h'.

==44865==

==44865== Events    : Ir

==44865== Collected : 31607647253

==44865==

==44865== I   refs:      31,607,647,253

 

2014-06-09 wireshark 1.99.0 (v1.99.0-rc1-200-g8996051 from master)

 

ericsson@tct-sniffer2:~/wireshark$ tools/valgrind-wireshark.sh -p -Y -b /home/ericsson/wireshark/ /home/ericsson/etxrab/TCT_SIP_traffic.pcapng

==29239== Callgrind, a call-graph generating cache profiler

==29239== Copyright (C) 2002-2012, and GNU GPL'd, by Josef Weidendorfer et al.

==29239== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info

==29239== Command: /home/ericsson/wireshark/.libs/lt-tshark -Y frame -nr /home/ericsson/etxrab/TCT_SIP_traffic.pcapng

==29239==

==29239== For interactive control, run 'callgrind_control -h'.

==29239==

==29239== Events    : Ir

==29239== Collected : 20842203780

==29239==

==29239== I   refs:      20,842,203,780

 

 

That's awesome, I hadn't realized all those little changes had added up so much.

 

I don’t remember now but it might be that the first incarnation of tvb_get_string_enc was really really expensive and we are cheating a bit now using ENC_UTF_8 for most of the cases,

Avoiding the char per character check.



Some stuff that might still be interesting to look into is xml parsing

Tvb_parse_get()

 

In tree_data_add_maybe_interesting_field() change the g_hash_table_new and g_ptr_array_add() to use wmem based functions.

 

Change p_add_proto_data() to use wmem based functions.

 

 

You may also want to look at using Jakub's new proto_tree API (passing the hf vars directly) since it uses one fewer layer of indirection. I think (but am not sure) that it might be a bit faster than the current one.

 

I haven’t got my head around how to use those yet…



Regards

Anders

 

 

 

___________________________________________________________________________
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