[PATCH] D109853: [MemProf] Avoid global lock when updating MIB cache
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 15 15:25:13 PDT 2021
tejohnson added inline comments.
================
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);
----------------
snehasish wrote:
> 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’`
Ah, I build with -Wno-format, so was missing these. If it is ok with you, since there are quite a few from various lines when I remove that option, I will commit those fixes as a separate change.
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