-
Notifications
You must be signed in to change notification settings - Fork 48
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
crit: add features to retrieve memory pages #133
crit: add features to retrieve memory pages #133
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #133 +/- ##
==========================================
+ Coverage 48.33% 50.25% +1.91%
==========================================
Files 23 24 +1
Lines 2435 2589 +154
==========================================
+ Hits 1177 1301 +124
- Misses 1084 1104 +20
- Partials 174 184 +10
☔ View full report in Codecov by Sentry. |
380a8f2
to
b1c3bdf
Compare
Thanks for the PR. I am a bit unsure about the design. Returning the content of the pages as a return parameter does not sound right. For large memory areas I would expect that using pointers would be better and would hopefully require less data movement. Nice to see tests included in the PR. You could try to also pass a couple of wrong parameters to test the error paths as well. |
b1c3bdf
to
61d6e74
Compare
I have made a few changes to the previous implementation:
Do you think this is a good direction for ? |
61d6e74
to
3d59f68
Compare
8bef749
to
555be57
Compare
555be57
to
04cef92
Compare
04cef92
to
6078c80
Compare
6078c80
to
57984f9
Compare
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.
LGTM
4455953
to
f53ae4c
Compare
f53ae4c
to
01ce351
Compare
This commit adds the MemoryReader struct with methods to retrieve the memory pages associated with a process. This feature enhances the functionality of crit as a package by providing access processes memory pages content. Signed-off-by: Kouame Behouba Manasse <behouba@gmail.com>
01ce351
to
8d118f4
Compare
This commit introduces a new function `readMemoryPages` that reads the process arguments and environment variables from memory pages and compares them with the `environ` and `cmdline` files of the process. Signed-off-by: Kouame Behouba Manasse <behouba@gmail.com>
988f6b8
to
4c337d0
Compare
Looks very good. Thanks. |
The goal of this PR is to add features for collecting memory pages content.
For the now I have added
GetMemPages
function to retrieve the memory pages of a process. Alongside it, helper functionsgenMemChunk
andgetPage
have been implemented. The core logic is derived from /~https://github.com/checkpoint-restore/criu/blob/criu-dev/coredump/criu_coredump/coredump.py.It's still a work in progress, but I would like to submit it for feedback.
PTAL: @adrianreber, @rst0git
Thank you!