Comments (6)
And thanks for addressing my previous issue! Things look much better.
from blazesym.
Sorry for not being very precise in my initial report. Here is more context.
I am trying to benchmark blazesym as a symbolization library for a profiling use case. I use the elf symbolizer code path. My assumption is indeed that the file is not being changed under my feet.
I have recurring calls to the symbolization library at every sample (10 ms per CPU). I could move these calls at larger intervals, however we then have a risk of loosing access to temporary files.
Even in the successful code paths, I indeed have a lot of syscalls to openat.
edit: Here are some logs from strace (with a sort | uniq -c), where I profile a single toy application. So we have thousands of calls to openat.
427 [pid 1328875] openat(AT_FDCWD, "/proc/1328872/root/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", O_RDONLY|O_CLOEXEC) = 45
2594 [pid 1328875] openat(AT_FDCWD, "/proc/1328872/root/usr/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 45
4671 [pid 1328875] openat(AT_FDCWD, "/proc/1328872/root/usr/local/bin/BadBoggleSolver_run", O_RDONLY|O_CLOEXEC) = 45
Happy to re-evaluate my usage of the library.
from blazesym.
That is correct. I am seeing repeated opens on the same files (which are given as the elf source). Happy to try things out 👍
I can understand the need for an option. Some folks might want there to be always a check on whether the cache is still valid.
from blazesym.
Thank you for the proposal. This solves my use case.
from blazesym.
Thanks for the report! Interesting. Are you using process symbolization? The stack trace you show seems to indicate that you are symbolizing using the ELF source. At this point we don't attempt to open split debug information or the like, so I kind of question that the library would open something like libcef.so.debug
unless explicitly asked for (say, using the ELF source and providing the path to that file).
We do funnel pretty much everything through a "file cache", which basically opens a file to check whether we are still working with an up-to-date copy (we could just stat
it, but that would have TOCTOU issues). If not, we want to reload contents. I suppose that some may have no interest in this logic and we could make it optional. That would be a legitimate source of open
calls.
That being said, it's entirely possible we have some duplicate open
s that could be avoided. I found one already, but it's in the process symbolization logic.
from blazesym.
Just to clarify, the paths that you see being opened are the files that you pass in as the ELF source, is that correct? The problem is just that they are repeatedly opened? Tomorrow I can add an option to circumvent the file cache and then you can re-check.
from blazesym.
Related Issues (20)
- Move C API into separate crate? HOT 5
- Remove `symbolize::Builder::enable_debug_syms()`? HOT 1
- Support pre-populating caches (pre-parsing data structures etc.)
- Cache demangling step HOT 5
- Failed to build on arm64 platform HOT 2
- Unable to get function name from c++ binary HOT 2
- Unprivileged normalize API HOT 5
- Supported OSes HOT 1
- crash when call api blaze_symbolize_kernel_abs_addrs and blaze_symbolize_process_abs_addrs HOT 16
- Are there any plans to support parsing local variables? HOT 1
- Error symbolizing Go binaries HOT 11
- Consider switching to `goblin` for ELF support HOT 1
- C API for interfacing with traces?
- Remove optional `circular` dependency
- tracking issue: `0.2` release (stable) HOT 1
- how can I get elf type using c api HOT 4
- Issue symbolizing Android stack addresses HOT 9
- aarch64-linux-android ld error
- Gnu debug link CRC read failures HOT 10
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 blazesym.