-
Notifications
You must be signed in to change notification settings - Fork 7
feat(memtrack): add C++ and Rust integration tests #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(memtrack): add C++ and Rust integration tests #212
Conversation
9477d9a to
b3231ff
Compare
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
|
63327c6 to
cea4068
Compare
cea4068 to
614ab90
Compare
614ab90 to
2670fb3
Compare
2670fb3 to
51536d2
Compare
GuillaumeLagrange
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
olgtm
|
|
||
| type TrackResult = anyhow::Result<(Vec<Event>, std::thread::JoinHandle<()>)>; | ||
|
|
||
| macro_rules! assert_events_with_marker { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an example usage as docstring here
| @@ -1,38 +1,13 @@ | |||
| use libbpf_rs::ErrorExt; | |||
| use memtrack::{EventType, MemtrackEventExt, Tracker}; | |||
| mod shared; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldnt we get rid of all the checking logic and add snapshots here as well ?
|
|
||
| // Prefixed standard API | ||
| // je_*_default API (C++ with static linking) | ||
| self.try_attach_malloc(lib_path, "je_malloc_default"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see this becoming quite an annoying thing to maintain over time.
Could we have some sort of structured consts for each allocator that would just be
struct AllocatorSymbols {
pub malloc_symbols = [...];
pub ...
}then each prob attach function would just loop over each symbol and call the proper functoin
Feel free to disregard if you dont see the point
posix_memalignandlibstdc++(libc but for C++)