[PATCH] D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option

Denis Revunov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 14:51:43 PDT 2023


treapster added inline comments.


================
Comment at: bolt/test/runtime/instrumentation-indirect-2.c:65-80
+CHECK-ALL-DAG: func1
+CHECK-ALL-DAG: func2
+CHECK-ALL-DAG: func3
+CHECK-ALL-DAG: func4
+CHECK-ALL-DAG: func5
+CHECK-ALL-DAG: func6
+CHECK-ALL-DAG: func7
----------------
rafauler wrote:
> treapster wrote:
> > rafauler wrote:
> > > rafauler wrote:
> > > > For some reason this test is failing on shared build.
> > > > 
> > > > Build BOLT with BUILD_SHARED_LIBS=On to check that.
> > > The reason this doesn't work is because  "func1" is matching to "func10"
> > > 
> > > Either remove func10-func16 or rename them with letters. e.g.: funca, funcb, funcc, funcd, funcf, funcg
> > I tried matching {{\bfunc1\b}} and similar constructs and it didn't help. I now changed numbers to letters and it still seems to fail sometimes..
> You're right, unfortunately it seems to be failing some times. That's annoying. I gave up on the DAG thing and tried this:
> 
> https://pastebin.com/rgn1hKr9
> 
> And it seems to be working consistently. That's one option forward, if you're OK with it.
It's ok but it will fire if the order in profile changes. Is it specified currently? Also we probably need to use -sleep-time for the first run, because otherwise the first process may start writing before the second finishes, and the second won't overwrite with newer profile because write mutex is locked. I'll play with it a bit more, it may not be a bug in FileCheck:)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153771



More information about the llvm-commits mailing list