[PATCH] D147740: [llvm-profdata] Refactoring Sample Profile Reader to increase FDO build speed using MD5 as key to Sample Profile map
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 05:19:15 PDT 2023
ro added a comment.
In D147740#4491943 <https://reviews.llvm.org/D147740#4491943>, @huangjd wrote:
> @ro I do not have access to SPARC machine, is there a way I can get a definite testing result on it, instead of adding more alignment checks and testing it on X86?
You actually **do** have access to SPARC machines, both Solaris and Linux: the GCC farm <https://cfarm.tetaneutral.net/machines/list/> provides just that.
That said, I've tested the previous version of your patch on Solaris/sparcv9. While 4 of the failures I'd reported are gone, `LLVM :: Transforms/SampleProfile/profile-format.ll` still `FAIL`s, now with
Assertion failed: Hash == hash_value(Key), file /vol/llvm/src/llvm-project/local/llvm/include/llvm/ProfileData/SampleProf.h, line 1352
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: /var/llvm/local-sparcv9-release-stage2-A-flang/tools/clang/stage2-bins/bin/opt -passes=sample-profile -sample-profile-file=/vol/llvm/src/llvm-project/local/llvm/test/Transforms/SampleProfile/Inputs/inline.extbinary.afdo -S
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 opt 0x00000001063a8648 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 36
1 opt 0x00000001063a8f34 SignalHandler(int) + 896
2 libc.so.1 0xffffffff7eec4f00 __sighndlr + 12
3 libc.so.1 0xffffffff7eeb77a8 call_user_handler + 1024
4 libc.so.1 0xffffffff7eeb7b98 sigacthandler + 208
5 libc.so.1 0xffffffff7eec9fc0 __lwp_sigqueue + 8
6 libc.so.1 0xffffffff7ede484c abort + 180
7 libc.so.1 0xffffffff7ede5680 _assert + 96
8 opt 0x0000000106dac008 std::pair<llvm::DenseMapIterator<llvm::hash_code, llvm::sampleprof::FunctionSamples, llvm::DenseMapInfo<llvm::hash_code, void>, llvm::detail::DenseMapPair<llvm::hash_code, llvm::sampleprof::FunctionSamples>, false>, bool> llvm::sampleprof::HashKeyMap<llvm::DenseMap, llvm::sampleprof::SampleContext, llvm::sampleprof::FunctionSamples>::try_emplace<llvm::sampleprof::FunctionSamples>(llvm::hash_code const&, llvm::sampleprof::SampleContext const&, llvm::sampleprof::FunctionSamples&&) + 396
9 opt 0x00000001072dfe40 llvm::sampleprof::SampleProfileReaderBinary::readFuncProfile(unsigned char const*) + 284
10 opt 0x00000001072e25d0 llvm::sampleprof::SampleProfileReaderExtBinaryBase::readFuncProfiles() + 3476
11 opt 0x00000001072e02f4 llvm::sampleprof::SampleProfileReaderExtBinaryBase::readOneSection(unsigned char const*, unsigned long, llvm::sampleprof::SecHdrTableEntry const&) + 384
12 opt 0x00000001072e3994 llvm::sampleprof::SampleProfileReaderExtBinaryBase::readImpl() + 212
13 opt 0x0000000106da3210 llvm::SampleProfileLoaderPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 2172
4 opt 0x0000000105cf7ca8 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 480
15 opt 0x0000000103769858 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) + 11060
16 opt 0x0000000103777f5c main + 8692
17 opt 0x0000000103766744 _start + 100
In addition, quite a number of other tests now `FAIL` with the same assertiion failure:
LLVM :: Transforms/SampleProfile/compressed-profile-symbol-list.ll
LLVM :: Transforms/SampleProfile/csspgo-import-list.ll
LLVM :: Transforms/SampleProfile/csspgo-inline-icall.ll
LLVM :: Transforms/SampleProfile/csspgo-inline.ll
LLVM :: Transforms/SampleProfile/fsafdo_test.ll
LLVM :: Transforms/SampleProfile/inline-mergeprof.ll
LLVM :: Transforms/SampleProfile/profile-context-tracker.ll
LLVM :: Transforms/SampleProfile/profile-format-compress.ll
LLVM :: Transforms/SampleProfile/profile-format.ll
LLVM :: Transforms/SampleProfile/profile-sample-accurate.ll
LLVM :: Transforms/SampleProfile/pseudo-probe-inline.ll
LLVM :: Transforms/SampleProfile/remap.ll
LLVM :: Transforms/SampleProfile/uncompressed-profile-symbol-list.ll
LLVM :: Transforms/SampleProfile/uniqname.ll
I've since retried with the latest version of the patch, but the failures remain.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147740/new/
https://reviews.llvm.org/D147740
More information about the llvm-commits
mailing list