llvm-project/compiler-rt/lib/scudo/standalone
Kostya Kortchinsky f7b1489ffc [scudo][standalone] Get statistics in a char buffer
Summary:
Following up on D68471, this CL introduces some `getStats` APIs to
gather statistics in char buffers (`ScopedString` really) instead of
printing them out right away. Ultimately `printStats` will just
output the buffer, but that allows us to potentially do some work
on the intermediate buffer, and can be used for a `mallocz` type
of functionality. This allows us to pretty much get rid of all the
`Printf` calls around, but I am keeping the function in for
debugging purposes.

This changes the existing tests to use the new APIs when required.

I will add new tests as suggested in D68471 in another CL.

Reviewers: morehouse, hctim, vitalybuka, eugenis, cferris

Reviewed By: morehouse

Subscribers: delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D68653

llvm-svn: 374173
2019-10-09 15:09:28 +00:00
..
tests [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
CMakeLists.txt compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
allocator_config.h [scudo][standalone] Android related improvements 2019-09-11 14:48:41 +00:00
atomic_helpers.h [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one 2019-07-11 15:32:26 +00:00
bytemap.h [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one 2019-07-11 15:32:26 +00:00
checksum.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
checksum.h [scudo][standalone] Introduce the chunk header 2019-05-08 21:54:02 +00:00
chunk.h compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
combined.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
common.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
common.h [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one 2019-07-11 15:32:26 +00:00
crc32_hw.cpp [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
flags.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
flags.h [scudo][standalone] Add flags & related parsers 2019-04-09 14:57:25 +00:00
flags.inc [scudo][standalone] Add flags & related parsers 2019-04-09 14:57:25 +00:00
flags_parser.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
flags_parser.h [scudo][standalone] Introduce the C & C++ wrappers [fixed] 2019-06-27 14:23:26 +00:00
fuchsia.cpp [scudo][standalone] Minor corrections 2019-08-12 15:35:09 +00:00
fuchsia.h [scudo][standalone] Introduce the Secondary allocator 2019-04-24 14:20:49 +00:00
interface.h [scudo][standalone] Add flags & related parsers 2019-04-09 14:57:25 +00:00
internal_defs.h [scudo][standalone] Minor corrections 2019-08-12 15:35:09 +00:00
linux.cpp [scudo][standalone] Minor corrections 2019-08-12 15:35:09 +00:00
linux.h [scudo][standalone] Introduce the Secondary allocator 2019-04-24 14:20:49 +00:00
list.h [scudo][standalone] Minor corrections 2019-08-12 15:35:09 +00:00
local_cache.h [scudo][standalone] Add more stats to mallinfo 2019-08-14 16:04:01 +00:00
mutex.h [scudo][standalone] Add more stats to mallinfo 2019-08-14 16:04:01 +00:00
platform.h
primary32.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
primary64.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
quarantine.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
release.h [scudo][standalone] Add the memory reclaiming mechanism 2019-04-30 14:56:18 +00:00
report.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
report.h [scudo][standalone] Add error reports 2019-03-20 14:31:23 +00:00
secondary.cpp [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
secondary.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
size_class_map.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
stats.h [scudo][standalone] Add more stats to mallinfo 2019-08-14 16:04:01 +00:00
string_utils.cpp [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
string_utils.h [scudo][standalone] Get statistics in a char buffer 2019-10-09 15:09:28 +00:00
tsd.h [scudo][standalone] Merge Spin & Blocking mutex into a Hybrid one 2019-07-11 15:32:26 +00:00
tsd_exclusive.h [scudo][standalone] Optimization pass 2019-07-24 16:36:01 +00:00
tsd_shared.h [scudo][standalone] Optimization pass 2019-07-24 16:36:01 +00:00
vector.h [scudo][standalone] Add a standalone vector class 2019-02-27 16:30:05 +00:00
wrappers_c.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
wrappers_c.h [scudo][standalone] Introduce the C & C++ wrappers [fixed] 2019-06-27 14:23:26 +00:00
wrappers_c.inc [scudo][standalone] Make malloc_info return a minimal XML 2019-10-04 15:46:34 +00:00
wrappers_c_bionic.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00
wrappers_c_checks.h [scudo][standalone] Introduce the C & C++ wrappers [fixed] 2019-06-27 14:23:26 +00:00
wrappers_cpp.cpp compiler-rt: Rename .cc file in lib/scudo/standalone to .cpp 2019-08-01 14:36:38 +00:00