Closed valuenumbering closed 2 years ago
Hi @valuenumbering!
I would guess the reason for that assertion is GCC-style split jump tables with entries pointing to the function and the cold fragment.
Did you enable the following gcc flag: -fno-reorder-blocks-and-partition
?
If that doesn't fix the issue, please share the exact steps to build mysqld binary.
Hi @aaupov, It is OK with -fno-reorder-blocks-and-partition. Thanks a ton!! Could you help another issue ? :). #264
Great! I've left the comment in #264. Closing this one.
I tried bolt to optimize mysql, using GCC 10.2.1 and adding -Wl, -q on Intel platform. But perf2bolt asserted! Perf version: 4.14.105-1
1) $ perf record -e cycles:u -j any,u 2) $ perf2bolt -p /data/perf_data/perf.data -o perf.fdata mysqld BOLT-INFO: enabling relocation mode PERF2BOLT: read 6670837 samples and 207213185 LBR entries PERF2BOLT: 0 samples (0.0%) were ignored PERF2BOLT: traces mismatching disassembled function contents: 114656 (0.1%) PERF2BOLT: out of range traces involving unknown regions: 36288826 (18.1%) perf2bolt: /data/bolt/bolt/lib/Core/BinaryContext.cpp:765: const llvm::MCSymbol* llvm::bolt::BinaryContext::getOrCreateJumpTable(llvm::bolt::BinaryFunction&, uint64_t, llvm::bolt::JumpTable::JumpTableType): Assertion `JT->Parent == &Function && "cannot re-use jump table of a different function"' failed.
== But I try a simple helloworld program, it is OK. Can anyone know how to debug the issue?