Comments (4)
I also got the same error when I ran LlvmPropellerProfileWriterTest
. Is it a problem with my build environment or is it due to other reasons?
from autofdo.
According to the comment information, I adjusted
if (r == kBuildIdNoteName) {
// Or use shdr.sh_addralign instead of 0?
- llvm::ArrayRef<uint8_t> build_id = note.getDesc(/*Align=*/0);
+ llvm::ArrayRef<uint8_t> build_id = note.getDesc(/*Align=*/shdr.sh_addralign);
std::string build_id_str(build_id.size() * 2, '0');
int k = 0;
template <class ELFT>
struct Elf_Nhdr_Impl {
LLVM_ELF_IMPORT_TYPES_ELFT(ELFT)
Elf_Word n_namesz;
Elf_Word n_descsz;
...
If Align = 0
, getDesc will use the offset of n_namesz
, this seems to be a bug?
But a new error occurred.
#0 0x00007f9031e48387 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f9031e48387 in raise () from /lib64/libc.so.6
#1 0x00007f9031e49a78 in abort () from /lib64/libc.so.6
#2 0x00007f9031e411a6 in __assert_fail_base () from /lib64/libc.so.6
#3 0x00007f9031e41252 in __assert_fail () from /lib64/libc.so.6
#4 0x000000000046db9c in llvm::object::BBAddrMap::getFunctionAddress (this=0x7f9028002a10)
at autofdo/third_party/llvm-project/llvm/include/llvm/Object/ELFTypes.h:924
#5 0x00000000004f052a in devtools_crosstool_autofdo::PropellerWholeProgramInfo::DropNonSelectedFunctions (this=0x29f9270, selected_functions=...)
at autofdo/llvm_propeller_whole_program_info.cc:584
#6 0x00000000004f1349 in devtools_crosstool_autofdo::PropellerWholeProgramInfo::SelectFunctions (this=0x29f9270,
cfg_creation_mode=devtools_crosstool_autofdo::CfgCreationMode::kOnlyHotFunctions, lbr_aggregation=0x7fff41e6a808)
at autofdo/llvm_propeller_whole_program_info.cc:689
#7 0x00000000004f1a57 in devtools_crosstool_autofdo::PropellerWholeProgramInfo::CreateCfgs (this=0x29f9270,
cfg_creation_mode=devtools_crosstool_autofdo::CfgCreationMode::kOnlyHotFunctions)
at autofdo/llvm_propeller_whole_program_info.cc:748
#8 0x00000000004dae4c in devtools_crosstool_autofdo::PropellerProfWriter::Create (options=..., perf_data_provider=..., frontend_status=0x29f1440)
at autofdo/llvm_propeller_profile_writer.cc:158
#9 0x00000000004da8f4 in devtools_crosstool_autofdo::GeneratePropellerProfiles (opts=..., perf_data_provider=...)
at autofdo/llvm_propeller_profile_writer.cc:121
#10 0x00000000004da56b in devtools_crosstool_autofdo::GeneratePropellerProfiles (opts=...)
at autofdo/llvm_propeller_profile_writer.cc:92
#11 0x0000000000440b09 in main (argc=8, argv=0x7fff41e6c2f8) at autofdo/create_llvm_prof.cc:197
from autofdo.
llvm_propeller_whole_program_info.cc
void PropellerWholeProgramInfo::DropNonSelectedFunctions(
const absl::btree_set<int> &selected_functions) {
for (int i = 0; i != bb_addr_map_.size(); ++i) {
if (selected_functions.contains(i))
continue;
bb_addr_map_[i].BBRanges.clear();
bb_addr_map_[i].BBRanges.shrink_to_fit();
if (!options_.keep_frontend_intermediate_data())
symtab_.erase(bb_addr_map_[i].getFunctionAddress());
}
}
In the new llvm api, getFunctionAddress
core dumps due to bb_addr_map_[i].BBRanges.clear();
.
The address should be saved before call BBRanges.clear()
;
uint64_t getFunctionAddress() const {
assert(!BBRanges.empty());
Return BBRanges.front().BaseAddress;
}
from autofdo.
Fixed buildid and getFunctionAddress problems (so we can drop the --profiled_binary_name flag) with #192 . And as to the performance, we are running experiments to see whether this regress the origin results. Will report back shortly.
from autofdo.
Related Issues (20)
- couldn't ninja HOT 2
- Disscussion: Does autofdo support .zdebug_{info,line}...
- llvm-16-compile-fix
- Apply PGO to the AutoFDO itself HOT 3
- [bug] No checking about "requires the first loadable segment to be executable". HOT 5
- Don't emit in output profile when sample count is 0. HOT 2
- excessive total_count HOT 1
- sample_reader.cc:102] Error reading from perf_inject_etm_test_loop.data&profile_creator.cc:138] Error reading profile.
- Please allow using system abseil (over bundled abseil)
- Completely broken, will not compile on Clear Linux or other distros I've tried HOT 22
- autofdo needs libprotofbuf-dev
- AutoFDO can not be built with LLVM trunk (LLVM-18)
- Optimization clang with Propeller: create_llvm_prof fails
- Propeller slows down clang ~20% HOT 4
- When support path cloning in propeller
- Build autofdo tool failed for llvm-master HOT 1
- create_gcov can not find binary with buildid and profile_creator can not read profile HOT 6
- Build fails, protobuf dependency HOT 2
- GCC12 use profiled created by create_gcov doesn't work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autofdo.