Commit Graph

45 Commits

Author SHA1 Message Date
Gerald Combs 1d030928ef Remove some GTK+-only code.
Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:44:47 +00:00
Dario Lombardo 8a5385b9c9 More licenses converted to SPDX.
Change-Id: Id4f987dcdacf06622d70263f4659a4400e30dc39
Reviewed-on: https://code.wireshark.org/review/26332
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 13:35:49 +00:00
Martin Mathieson 9972110f31 valgrind-wireshark.sh: fix typo in usage
Change-Id: If9210c6f71d4e258a489d254482cf5543b818e11
Reviewed-on: https://code.wireshark.org/review/25491
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-27 23:10:57 +00:00
Dario Lombardo f22c7139e0 tools: add options validation.
This prevents to call the apps with incongruent options.

Change-Id: I76919a2da141bd277c06e708548c971c19dd7af7
Reviewed-on: https://code.wireshark.org/review/20211
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-24 13:49:56 +00:00
Dario Lombardo 30266527aa tools: add a Gtk/GNOME suppression file.
As described here https://wiki.gnome.org/Valgrind valgrind can be
tuned for Gtk/GNOME (glib) software by this official (or so) suppression
file. Add it to the standard valgrind script to reduce the output
for those functions out of Wireshark scope.

Change-Id: I5dbc91ce82a890c9c02b624289ced96909be5f84
Reviewed-on: https://code.wireshark.org/review/19910
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-02-02 12:42:01 +00:00
Dario Lombardo 6eca591de6 tools: allow multiple suppression file for valgrind.
Change-Id: I7074705230deb3d24df8f2ea694a3a485c848efd
Reviewed-on: https://code.wireshark.org/review/19711
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2017-01-23 12:27:51 +00:00
Dario Lombardo 05fad31ea4 tools: add options documentation to valgrind-wireshark.sh
Change-Id: Id0bb85b9499f1e6f327b711d38deefe295e92c1a
Reviewed-on: https://code.wireshark.org/review/19624
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-13 10:43:48 +00:00
Dario Lombardo 22a569ad3a tools: improve valgrind script.
Change-Id: Ifae62e6334b48002516dfff6d1c2f094445f423c
Reviewed-on: https://code.wireshark.org/review/13820
Reviewed-by: Evan Huus <eapache@gmail.com>
2016-02-08 15:24:02 +00:00
Evan Huus 4ee22e88cd Update valgrind script for the UI
Plain 'wireshark' is now the Qt version, and 'wireshark-gtk' is the GTK version.

Change-Id: I893d6ae9a205998e191cbf6160cf27fcfd09bb4d
Reviewed-on: https://code.wireshark.org/review/9181
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-26 21:17:39 +00:00
Evan Huus 8f40e2cd8d tools: permit setting BIN_DIR in the environment
For out-of-tree builds you have to pass the location of your build to our tools
like the fuzz script, valgrind script etc. Modify them so that the value can be
set in the environment rather than requiring a shell script flag.

Set the environment variable in the vagrant provision step, so that the scripts
Just Work (TM) in the VM.

Change-Id: If8ce6b278176085ba6dd994137b82fc989b80124
Reviewed-on: https://code.wireshark.org/review/9168
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-26 06:52:58 +00:00
Jeff Morriss 0b0f7fa091 More emem removal.
Remove emem's 8-byte-memory-alignment configure check as well as references
to all the environment variables emem used.

Change-Id: I897aec9e9c68e064454561e7a9f066b18892ec66
Reviewed-on: https://code.wireshark.org/review/6950
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-06 08:11:49 +00:00
AndersBroman cfe3bfdc25 Add -Q for QtShark and change the dumpcap command to use number of
packets.

Change-Id: Ia4dc03e3722379d41804758feeafb655f26376e9
Reviewed-on: https://code.wireshark.org/review/1573
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-09 12:13:52 +00:00
AndersBroman 379c9f25df Add a command option for dumpcap.
Change-Id: Ic9a4b35f5a6245e0100f93c890622674e44413c6
Reviewed-on: https://code.wireshark.org/review/1564
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-08 19:30:18 +00:00
Jeff Morriss 82e2865739 Remove $Id$ and other Subversion leftovers from the tools.
There are a few things in here which could still use attention.

Don't regenerate anything now.

Change-Id: I283c224d3523212144707fca3d6265916cb11792
Reviewed-on: https://code.wireshark.org/review/205
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-14 01:35:57 +00:00
Bill Meier 8f888557af Add -P option to allow specifying the 'callgrind-out-file' name
svn path=/trunk/; revision=53250
2013-11-11 18:44:50 +00:00
Evan Huus a10254082b When profiling we are more interested in real-world performance than memory
errors, so we want to use the "fast" allocators rather than the ones that are
friendly to memcheck.

svn path=/trunk/; revision=51969
2013-09-12 13:45:04 +00:00
Evan Huus 1a884bf191 Add a valgrind suppressions file set to suppress the zlib error which otherwise
pops up immediately on the fuzzbot. Hopefully there won't be too many more of
these.

svn path=/trunk/; revision=51434
2013-08-20 03:21:06 +00:00
Evan Huus 5d8b79cff5 Try to use smarter path resolution and detection in order to work in
environments that are not the build tree (namely the fuzz-bot, but this might
make normal out-of-tree builds easier too).

svn path=/trunk/; revision=51387
2013-08-16 01:52:51 +00:00
Martin Mathieson b49fbad27d Add a couple of missing lines from the usage output.
svn path=/trunk/; revision=50043
2013-06-19 18:06:46 +00:00
Jeff Morriss 1cc0587d00 Add a -Y option to match test-captures.sh: it runs tshark with a read filter but without building the tree.
svn path=/trunk/; revision=49797
2013-06-05 21:30:08 +00:00
Evan Huus eae1f37865 Use the local libtool rather than whatever is in PATH. This works just
the same everywhere I've tested except my mac setup where it works better
(since the libtool in PATH doesn't have --mode=execute for some strange reason).

This is fairly experimental - feel free to revert if it breaks something.

svn path=/trunk/; revision=49604
2013-05-28 22:29:02 +00:00
Evan Huus 396a1881b7 Add -p option to the valgrind script for profiling with callgrind.
svn path=/trunk/; revision=49543
2013-05-23 02:30:40 +00:00
Evan Huus 69fae76be1 Support running the massif valgrind tool for memory profiling.
svn path=/trunk/; revision=49251
2013-05-11 19:03:54 +00:00
Evan Huus 3b4a82d26a Add -W option to valgrind script that just runs the gui without any capture
files.

svn path=/trunk/; revision=48320
2013-03-15 16:42:05 +00:00
Evan Huus 419d10656e Update usage info for valgrind script. We almost need a proper man page for
this now.

svn path=/trunk/; revision=48230
2013-03-10 15:07:42 +00:00
Evan Huus aafe8b18e9 Remove the wmem slab. It was an optimization mimicking the emem slab
(removed in r48218) which did nothing particularly useful. Also lets us remove
another debugging environment variable.

svn path=/trunk/; revision=48219
2013-03-09 20:16:33 +00:00
Evan Huus 122b7cb6df Remove the emem slab feature (sl_* functions) completely, replacing it with
glib memory slices.

- We weren't doing anything with the emem slab that couldn't be done with glib
  slices.
- Removes a fair bit of code as well as one debugging environment variable.
- Glib slices are much cache-friendlier and are multi-threading friendly (if
  we ever go there).
- Allows glib to actually return slices to the OS on occasion. The emem slab
  would hold onto its memory forever which resulted in a great deal of wasted
  memory after closing a large file.

svn path=/trunk/; revision=48218
2013-03-09 20:02:19 +00:00
Evan Huus 16bda3caf4 Don't pass -v straight to valgrind, it's rarely useful. Just increasing
num-callers is usually enough.

svn path=/trunk/; revision=48017
2013-03-02 21:16:32 +00:00
Evan Huus 5071e8b627 Add an option for bypassing the wmem slab similar to the one for
bypassing the emem slab, to aid in debugging with valgrind.

svn path=/trunk/; revision=47656
2013-02-14 16:07:25 +00:00
Evan Huus d8967afa61 Add -v for verbose valgrind output.
svn path=/trunk/; revision=47113
2013-01-16 14:02:30 +00:00
Jeff Morriss 99ce4232cb As suggested in comments in sl_alloc() and sl_free(): add a new environment
variable (WIRESHARK_DEBUG_USE_SLICES) which turns off the slab allocator and uses
g_slices instead (which can themselves be turned off by setting
G_SLICE=always-malloc).

This makes debugging problems in slab-allocated memory easier to find
(hopefully including https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8197 ).


Set WIRESHARK_DEBUG_USE_SLICES when running Valgrind on *shark.


Remove unused structure member: emem_chunk_t.org.

svn path=/trunk/; revision=47110
2013-01-16 03:34:29 +00:00
Evan Huus 442b61d0a4 Change the format of the environment variable slightly to allow overriding
allocator choice to use any specific allocator, not just simple.

svn path=/trunk/; revision=46816
2012-12-27 22:51:33 +00:00
Evan Huus 5cf858ec52 Dispatch all allocator creations through a single function using an enum to
determine the desired type. This has two advantages over the old way:
 - just one environment variable for valgrind to override in order to guarantee
   that ALL allocators use memory it can track, and just one place to check that
   variable
 - allocator owners no longer have to include headers specific to their
   allocator, allowing them to change allocators without adjusting all their
   #includes

svn path=/trunk/; revision=46604
2012-12-19 00:43:36 +00:00
Evan Huus f72aa597c7 Make the new -T option not overwrite the other options, so it can
be used in conjuction with -2 et al.

svn path=/trunk/; revision=46362
2012-12-04 00:05:58 +00:00
Jeff Morriss b5d14d6dcd Add an option to control whether tshark builds the tree (\"-T\").
Note the change in behavior: building the tree is now off by default.

Complain (and exit) if we get an argument we don't understand.

svn path=/trunk/; revision=46321
2012-12-02 02:58:29 +00:00
Evan Huus e2c9d02ba8 Fix typo
svn path=/trunk/; revision=46317
2012-12-01 20:51:20 +00:00
Evan Huus d730f8d348 Add -r option to valgrind script for --show-reachable=yes.
svn path=/trunk/; revision=46316
2012-12-01 20:49:27 +00:00
Evan Huus 706211b642 Make the wmem scopes friendly to the valgrind script like emem is.
svn path=/trunk/; revision=46171
2012-11-24 19:02:05 +00:00
Evan Huus ca21cf8083 Add -n option to valgrind script that runs with -v instead of a pcap file.
Useful for find issues and leaks in non-dissection related code when you
don't have a capture file handy.

svn path=/trunk/; revision=45979
2012-11-09 02:10:48 +00:00
Evan Huus 69a95ad3a2 valgrind-wireshark.sh:
- add support for 2-pass dissection and config profiles
 - make whitespace a consistent 4-spaces
fuzz-test.sh:
 - update 2-pass support to use -2 and not the old -P
 - add support for fuzz-testing under valgrind with the new -g option

svn path=/trunk/; revision=44024
2012-07-26 02:38:34 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jeff Morriss 98b8a9895a Add copyright notices. Fix SVN properties on svnadd.
svn path=/trunk/; revision=42375
2012-05-01 18:59:12 +00:00
Jeff Morriss 2c103b9d5f From Evan Huus via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7218 :
Add 'track-origins' option flag to valgrind script.

svn path=/trunk/; revision=42345
2012-04-30 13:20:27 +00:00
Jeff Morriss 1108df5539 Make it possible to run capinfos and editcap from this script.
svn path=/trunk/; revision=41611
2012-03-16 14:12:01 +00:00
Jeff Morriss 4de661bb9f Add a little shell script to export the appropriate variables necessary for
running valgrind and then run it on either tshark or (if the user is very
patient) Wireshark.

svn path=/trunk/; revision=39627
2011-10-27 02:32:32 +00:00