Skip to content
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

memparse: add search functionality to memparse #141

Merged
merged 4 commits into from
Sep 24, 2024

Conversation

behouba
Copy link
Collaborator

@behouba behouba commented Jul 21, 2024

This draft PR is intended to help evaluate the performance of #163. It introduces --search and --context flags to memparse, enabling pattern searches within a process's memory pages.

Example usage:

checkpointctl memparse --search=JAVA_VERSION --context=10 --pid 2 jira-chkpt.tar.gz

Address           Pattern                           Instance
------------------------------------------------------------
000000008181bf00    =       JAVA_VERSION            [1]
000000008181bf20    =       JAVA_VERSION            [2]
00007fffe4e28fc2  sian/jira JAVA_VERSION=jdk-11.0.  [3]

Copy link

github-actions bot commented Jul 21, 2024

Test Results

60 tests  +5   60 ✅ +5   1s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit be48b4a. ± Comparison against base commit 037da26.

♻️ This comment has been updated with latest results.

cmd/memparse.go Outdated Show resolved Hide resolved
cmd/memparse.go Outdated Show resolved Hide resolved
cmd/memparse.go Outdated Show resolved Hide resolved
cmd/memparse.go Outdated Show resolved Hide resolved
cmd/memparse.go Outdated Show resolved Hide resolved
test/checkpointctl.bats Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.50%. Comparing base (f76433c) to head (be48b4a).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
cmd/memparse.go 90.90% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
+ Coverage   78.73%   81.50%   +2.77%     
==========================================
  Files          11       11              
  Lines        1260     1060     -200     
==========================================
- Hits          992      864     -128     
+ Misses        201      126      -75     
- Partials       67       70       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rst0git rst0git changed the title feat(memparse): add search functionnality to memparse memparse: add search functionality to memparse Jul 25, 2024
@behouba behouba force-pushed the search-memory-pages branch 2 times, most recently from 694ce19 to 5b6e6b2 Compare July 25, 2024 18:31
cmd/memparse.go Outdated Show resolved Hide resolved
@snprajwal
Copy link
Member

Hi @behouba! If you feel the changes on go-criu are ready, we can make a new release of the library and update this PR. What do you think?

@behouba
Copy link
Collaborator Author

behouba commented Aug 28, 2024

Hi @snprajwal! I think we’re ready for a new release of go-criu. I’ve been testing the new feature on various checkpoints, and everything seems to be working well so far. Let’s proceed with a new release of the library )

@snprajwal
Copy link
Member

@behouba we have go-criu v7.2.0 out :)

Signed-off-by: Kouame Behouba Manasse <[email protected]>
This commit adds `--search`, `--search-regex` and `--context` flags
to `memparse`, enabling pattern search in a process's memory pages.

Signed-off-by: Kouame Behouba Manasse <[email protected]>
…lags in `memparse`

Signed-off-by: Kouame Behouba Manasse <[email protected]>
@behouba behouba marked this pull request as ready for review September 15, 2024 03:23
Copy link
Member

@snprajwal snprajwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This is an awesome feature, thanks :D

@snprajwal
Copy link
Member

@rst0git PTAL

…mparse man page.

Signed-off-by: Kouame Behouba Manasse <[email protected]>
Copy link
Member

@rst0git rst0git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rst0git rst0git merged commit 3fcc128 into checkpoint-restore:main Sep 24, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants