[all-commits] [llvm/llvm-project] a18ee8: [MC] Make .pseudo_probe created sections determini...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Sep 20 18:11:28 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a18ee8b7c95c6dfa410c6acaaf8cffcfde1220b5
      https://github.com/llvm/llvm-project/commit/a18ee8b7c95c6dfa410c6acaaf8cffcfde1220b5
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-09-20 (Wed, 20 Sep 2023)

  Changed paths:
    M llvm/include/llvm/MC/MCPseudoProbe.h
    M llvm/lib/MC/MCPseudoProbe.cpp
    M llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll

  Log Message:
  -----------
  [MC] Make .pseudo_probe created sections deterministic after D91878

MCPseudoProbeSections::emit iterates over MCProbeDivisions and creates sections.
When the map key is MCSymbol *, the iteration order is not stable. The
underlying BumpPtrAllocator largely decreases the flakiness. That said, two
elements may sit in two different allocations from BumpPtrAllocator, with
an unpredictable order. Under tcmalloc,
llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll fails about 7 times per
1000 runs.




More information about the All-commits mailing list