Commit Graph

44 Commits (master)

Author SHA1 Message Date
Caolán McNamara 94341f0390 cid#360697 Ignoring number of bytes read
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I24c1bf9f103f3bf1325246a0223919ff1dbf62b4
2024-04-23 08:53:55 +02:00
Ashod Nakashian 21b0394828 wsd: better empty string operations
Change-Id: Ic14efcaa8a1c345b875c27446b16f51740c55efa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-03-18 18:41:49 +00:00
Michael Meeks 7b9e11a382 coolmap: annotate hex dumps with memory map names for pointers.
Also dump a list of shared libraries by reference count in
unshared pages.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Iecc281b27059c2f051b07fea29ab27be7d5703c0
2024-02-29 15:26:34 +00:00
Michael Meeks b45f4b8f93 spdx: improve machine and human readability of headers.
Change-Id: I71f1421debf31b8c6cd0fd75c0cb45e2563b8a5a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-11-20 14:30:02 +00:00
Caolán McNamara 6682a2a527 cid#318900 Out-of-bounds write
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I18f30bbe7271a93a44ce798e358277add9876454
2023-08-14 12:31:55 +02:00
Caolán McNamara 5185b7bedf cid#318934 silence Untrusted loop bound
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icd7a7d3394dda93045f97481b109498fca3c01c8
2023-08-10 08:47:25 +02:00
Caolán McNamara d078354eb7 cid#318955 Uninitialized scalar field
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2df245ffa6bf45536ebe4383033dcdd87f280bc2
2023-07-05 14:49:59 +02:00
Caolán McNamara 13ed88a547 cid#318930 Resource leak
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I12cdbe749b2f46422f329e9da39427ede7feb436
2023-06-14 10:10:46 +02:00
Michael Meeks 7987af35c4 coolmap: accelerate handling large ascii strings without \0 termination.
Change-Id: I6831f455da038a20eb611fbbb0902dc495dc31d7
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-10 17:08:59 +00:00
Miklos Vajna 8e2829fee7 tools: fix -Werror,-Wfortify-source
'sscanf' may overflow; destination buffer in 'smap_key' has size 20, but
the corresponding specifier in tools/map.cpp:570 may require size 21.

Change-Id: Ie7356db924193777869a39b882512a864c0e10c5
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-24 12:33:23 +01:00
Mert Tumer b59fbe8d4c rename: loolmap -> coolmap
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I3136305d5733c5c7a886baa230fd4c1e1401b734
2021-11-17 21:51:05 +01:00
Ashod Nakashian 5467a7f7ef wsd: simplify and document dumpHex
Change-Id: I636dd6548b0712a72dfc162eb7381e3e7ac18b5a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-13 19:34:02 -05:00
Gleb Popov 7f0b19baa7 map.cpp: Add an implementation of glibc-specific error() function.
Change-Id: Ib7b87ed27a27b050d38b9c51c0c8d7a7fca32973
Signed-off-by: Gleb Popov <6yearold@gmail.com>
2020-11-16 14:02:23 +00:00
Andras Timar 0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Ashod Nakashian 224ef08c7f wsd: single-char string literals -> char
More readable and typically more efficient.

Change-Id: I9bd5bfc91f4ac255bb8ae0987708fb8b56b398f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95285
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-06-02 01:31:26 +02:00
Miklos Vajna d0fee8c6ad These can be made const
Change-Id: I952a7566176bda727f8c2e9618d41bfb7bb1240f
Reviewed-on: https://gerrit.libreoffice.org/85197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16 09:24:08 +01:00
Jan Holesovsky 5b5e29b430 killpoco: Don't use POCO for app exit values.
Change-Id: I2948ac45a7b4243f7afde08d5245530fdbf9a070
Reviewed-on: https://gerrit.libreoffice.org/82125
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-11-07 12:23:47 +01:00
Miklos Vajna 6bc1fa6215 tools: make members private in AddrSpace
Only _addrToStr needed a getter, the rest is not used externally.

Change-Id: Ie1c0f860c6aa0acc26c8c7272298225a4804a5e5
2019-01-14 08:44:04 +01:00
Miklos Vajna 6c8af8091f tools: make members private in StringData
Change-Id: I6c080264d2c66abdb6760c190f3727dd0159c865
2019-01-11 09:08:44 +01:00
Miklos Vajna 5391c09fba tools: make members private in Map
Change-Id: I9f23d5095e387888e43c0a0d2e6ed041ac5aed68
2019-01-10 09:11:55 +01:00
Miklos Vajna 9733e0f7ff tools: spell out non-trivial autos to improve readability
Change-Id: I8b462c5e6ae96fb8daf2abd1ed3756a796cdd434
2018-02-07 10:18:12 +01:00
Michael Meeks 9af34dd15c loolmap: configurable width for hex dumping.
Change-Id: Id53426b84362a8a34bcbb116c6567d9264241b3c
2018-01-09 11:47:28 +00:00
Michael Meeks 8ec2738095 loolmap: re-work string dumping and scan for C strings.
Change-Id: I32b496cb83538477be8088285868bbb3236b146a
2018-01-09 11:19:27 +00:00
Pranav Kant 9cbef14160 loplugin:nullptr
Change-Id: I5f0dc970e8522b63570faa0ba05ab19dd0f45d5a
2017-12-20 22:36:41 +05:30
Pranav Kant f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Michael Meeks 864b07f5b3 Annotate string pointers in hex dumps to make sense of memory.
Change-Id: I7934ccf379dbca9862ddb911865aaeff692261bf
2017-12-15 22:45:04 +00:00
Michael Meeks 453637e8a1 loolmap: fix assert on zero parent pages.
Change-Id: Ieeac3e5fc3746e4089d8688e96bb9dcb59ee17c5
2017-12-12 12:04:19 +00:00
Michael Meeks 44600de7c7 loolmap: implement a simple string scan and dump function.
Change-Id: I056f764c99f977a0178105511dfd5406ea6dbfa5
2017-12-11 21:53:40 +00:00
Michael Meeks 7dcd2ddd90 loolmap: share some /proc opening pieces.
Change-Id: I2d8b6eeec4afad52f74153c3d7ac904dfcb5db8f
2017-12-11 21:53:40 +00:00
Michael Meeks 50cdc16884 loolmap: store address space mappings.
Change-Id: I30b61ed8407996923f07368263bc8b773dfdc061
2017-12-11 21:53:40 +00:00
Miklos Vajna a597fa9a47 loolmap: clean up dead assignment
style gets re-assigned on all paths below.

Change-Id: I4164f745c00e39b82410820cffe4682c079fd741
Reviewed-on: https://gerrit.libreoffice.org/46211
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-12-11 09:49:51 +01:00
Michael Meeks 73327ce2ec loolmap: more cleanup print more metrics.
Change-Id: Ie6d82222a5d8960a317ea22d0628e6250330bbc7
2017-12-04 21:55:14 +00:00
Pranav Kant 99a7f1f992 Fix build; no operator== on std::stringstream
I guess we wanted to match strings there.

Change-Id: I5b76435144ce931718cc758963e79de7d0f5a9ea
2017-12-04 19:04:25 +05:30
Michael Meeks 886a8a7ab8 loolmap - improve page annotation, and page diffs, count dirty bytes.
Change-Id: Iaaae8fca2bdd11961682d6f8dafa38e4ca51c44c
2017-12-01 17:39:28 +00:00
Michael Meeks 26876e6165 loolmap - read the parent's page data for unshared pages too.
Change-Id: I23bb319fa4694638efc82c7af86224d2e041160c
2017-11-30 13:33:25 +00:00
Michael Meeks 0778b72697 Dump hex contents of un-shared memory.
Change-Id: I47dfa8a0b48d0ba34b7462301b83e2721617814d
2017-11-29 03:33:16 +00:00
Michael Meeks 16898cbffc RLE compress sharing bitmap for display.
Change-Id: Ib47e2ceb481c0a9b4c36fc6f5304bf03acec128b
2017-11-29 02:38:33 +00:00
Michael Meeks 65f3d658cb Collect anonymous and file backed mappings too.
Change-Id: I7bf23917436bdffb483b288414409ccc53ed540c
2017-11-28 18:46:09 +00:00
Michael Meeks 2fb4521a9c Dump unshared heap memory ascii-art map by page..
Change-Id: I21ef386958e651b53b4d8eef434958a20adcbe68
2017-11-28 18:08:26 +00:00
Michael Meeks 5540fc0b7f Cleanup, memory map dumper, add <pid> mode, and collect heap pages.
Change-Id: I14e428b96c591e84ec9f50f0a75782c97660944b
2017-11-28 17:27:34 +00:00
Tor Lillqvist a0b82c9fdb Avoid warning: ‘%s’ directive output may be truncated writing up to 255 bytes
... into a region of size 58

Change-Id: I725c537ed21553e9dc34ba006a39917e1549b6a7
2017-10-26 12:03:38 +03:00
Michael Meeks 0eaef6c896 config.h - get includes right: must always be the first include. 2017-03-10 10:47:43 +01:00
Noel Grandin 4ed820d3d5 add a configure option for using clang compiler plugins
and apply the nullptr plugin.

Lots of hacking in my LO tree required to make this work, will probably
end up needing to add an extra parameter to the LO side.

Change-Id: I02ae1dcdece9d9ddf05f7757f6696e3a5d7d1f14
Reviewed-on: https://gerrit.libreoffice.org/32339
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-22 14:23:42 +00:00
Michael Meeks c1a398977f Adapt makefiles, includes etc. to new locations. 2016-11-25 09:58:57 +00:00