[PATCH] D68653: [scudo][standalone] Get statistics in a char buffer

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 10:36:54 PDT 2019


cryptoad created this revision.
cryptoad added reviewers: morehouse, hctim, vitalybuka, eugenis, cferris.
Herald added subscribers: Sanitizers, delcypher.
Herald added projects: LLVM, Sanitizers.

Following up on D68471 <https://reviews.llvm.org/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 <https://reviews.llvm.org/D68471> in another CL.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D68653

Files:
  lib/scudo/standalone/combined.h
  lib/scudo/standalone/crc32_hw.cpp
  lib/scudo/standalone/primary32.h
  lib/scudo/standalone/primary64.h
  lib/scudo/standalone/quarantine.h
  lib/scudo/standalone/secondary.cpp
  lib/scudo/standalone/secondary.h
  lib/scudo/standalone/size_class_map.h
  lib/scudo/standalone/string_utils.cpp
  lib/scudo/standalone/string_utils.h
  lib/scudo/standalone/tests/primary_test.cpp
  lib/scudo/standalone/tests/quarantine_test.cpp
  lib/scudo/standalone/tests/secondary_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68653.223899.patch
Type: text/x-patch
Size: 16388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191008/735a9265/attachment-0001.bin>


More information about the llvm-commits mailing list