[PATCH] D109853: [MemProf] Avoid global lock when updating MIB cache

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 15:13:50 PDT 2021


snehasish accepted this revision.
snehasish added a comment.
This revision is now accepted and ready to land.

LGTM with one minor comment.



================
Comment at: compiler-rt/lib/memprof/memprof_allocator.cpp:347
+    u64 p = AccessCount ? MissCount * 10000ULL / AccessCount : 0;
+    Printf("Set %d miss rate: %d / %d = %5d.%02d%%\n", i, MissCount,
+           AccessCount, p / 100, p % 100);
----------------
Since you are touching these lines, can you update the format specifiers to match the data types?
Same for the loop below.

It would clean up some of the errors I am seeing with -Wformat - e.g.
`warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘__sanitizer::u64’`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109853/new/

https://reviews.llvm.org/D109853



More information about the llvm-commits mailing list