[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 16:29:41 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:
> tejohnson wrote:
> > 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.
> A separate cleanup patch with the option removed sounds better. Thanks!
Fix committed in 242524741f3582d93e4fac8052d0bfc40f4c1ac4.
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