Comments (2)
Yes, it works as intended. You can use simpleperf dump
to dump a perf.data, and check symbols from multiple dsos in FEAT_FILE2 section.
from ndk.
Oh indeed, it does work! The code is just a bit confusing - it looks as if it's trying to write multiple different feature sections, but instead it's all concatenated into one single big feature section.
But after writing each of them, it updates the section offset + size of the
FEAT_FILE2
feature to point to the last-written section.
No, it only updates the size. RecordFileWriter::WriteFeatureBegin
leaves the offset untouched if the feature already exists in RecordFileWriter::features_
.
RecordFileWriter::WriteFeatureEnd
updates the size.
So really, I was confused by the repeated calls to WriteFeatureBegin
and WriteFeatureEnd
. It would be clearer if there was only one call to each of them total, rather than one call per DSO. Repeated calls to WriteFeatureBegin
are no-ops, and repeated calls to WriteFeatureEnd
overwrite the previous call's effects.
RecordFileReader::LoadBuildIdAndFileFeatures
appears to try to read multiple file feature sections. But the offset + size for each section is obtained fromfeature_section_descriptors_.find(FEAT_FILE2)->second
, which will return the same values every time.
That's correct, but the read_pos
will be the relative offset to the start of the section, and when RecordFileReader::ReadFileFeature
returns, only the data for one DSO has been read, so read_pos
will now point partway into the section, to the beginning of the data for the next DSO. So read_pos
is different for each call to RecordFileReader::ReadFileFeature
. Only once the data for all DSOs has been read will read_pos
be equal to desc.size
.
Again, what's confusing here is that there are multiple calls to RecordFileReader::ReadFileFeature
, even though all calls are reading bytes from the same feature section. And the feature section descriptor is obtained repeatedly on each call even though it's always the same.
from ndk.
Related Issues (20)
- [FR] push/pop required policies in cmake toolchain file HOT 16
- [DOC] Clarification on 16k page size support for x86_64 devices HOT 3
- [DOC] `system_fonts.h` HOT 7
- [Bug]: Lambda segfaults in Clang HOT 11
- [FR] Official NDK release for Linux arm64 HOT 1
- [Bug]: fatal error: error in backend: Cannot select: 0x10ba8ace0: nxv4f32 = BUILD_VECTOR 0x133163a90, 0x1330f4800, 0x133108d20, 0x1248b9e60 HOT 6
- [BUG] Compilation Error with std::execution in C++17 HOT 3
- [BUG] CLEAR_VARS does not clear LOCAL_STRIP_MODE variable HOT 2
- [Bug]: Android NDK r27 rc2 miscompiles code with inderect gotos HOT 13
- [Bug] NDK's openmp test crashing on x86 with latest LLVM update HOT 4
- Please provide maintainable list of NDK codename-revision pairs HOT 3
- [Bug]: clang compile with -D_FORTIFY_SOURCE=2 -Dstatic= cause undefined symbol: snprintf HOT 7
- [BUG] android-ndk-r26c use -pg ld.lld: error: undefined symbol: _mcount HOT 7
- [Bug]: Compiler Crash HOT 5
- [FR] support libclang? HOT 1
- [BUG] investigate odd find_package behavior HOT 3
- [BUG] NDK 27 no longer supports passing in `CMAKE_SYSTEM_PROCESSOR` to CMake to set the arch HOT 8
- [Bug]: Unable to disable a builtin with -fno-builtin-wmemchr HOT 17
- [BUG] sysroot wrongly includes tflite_support_libz.a? HOT 3
- [BUG] Build error of ncnn for Android 'x86_64' ABI with NDK r27 HOT 4
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 ndk.