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

Replace Base() with ObjAddr() in the plugin.ObjFile interface. #622

Merged
merged 1 commit into from Apr 13, 2021

Conversation

gmarin13
Copy link
Contributor

Modify the plugin.ObjFile interface by replacing the "Base() uint64" method
with an "ObjAddr(addr uint64) (uint64, error)" method. The latter computes
the objdump address corresponding to the given runtime address.

The change removes direct access to the base value, but enables us to delay
computing the base until it is actually needed.

@gmarin13 gmarin13 requested a review from aalexand April 12, 2021 23:34
@google-cla google-cla bot added the cla: yes label Apr 12, 2021
@aalexand
Copy link
Collaborator

@gmarin13 Looks like some tests failed on Windows.

FAIL
FAIL	github.com/google/pprof/internal/binutils	3.685s

Modify the plugin.ObjFile interface by replacing the "Base() uint64" method
with an "ObjAddr(addr uint64) (uint64, error)" method. The latter computes
the objdump address corresponding to the given runtime address.

The change removes direct access to the base value, but enables us to delay
computing the base until it is actually needed.
@codecov-io
Copy link

Codecov Report

Merging #622 (0673275) into master (94a9f03) will decrease coverage by 0.04%.
The diff coverage is n/a.

❗ Current head 0673275 differs from pull request most recent head f828ff1. Consider uploading reports for the commit f828ff1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #622      +/-   ##
==========================================
- Coverage   66.99%   66.94%   -0.05%     
==========================================
  Files          39       39              
  Lines        7189     7195       +6     
==========================================
+ Hits         4816     4817       +1     
- Misses       1939     1942       +3     
- Partials      434      436       +2     
Impacted Files Coverage Δ
.../github.com/google/pprof/internal/report/source.go 77.26% <0.00%> (-0.95%) ⬇️
.../github.com/google/pprof/internal/report/report.go 21.97% <0.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94a9f03...f828ff1. Read the comment docs.

@gmarin13
Copy link
Contributor Author

@gmarin13 Looks like some tests failed on Windows.

FAIL
FAIL	github.com/google/pprof/internal/binutils	3.685s

I had one typo in the test file.

@aalexand aalexand merged commit 7c2eacd into google:master Apr 13, 2021
@gmarin13 gmarin13 deleted the obj_addr branch July 20, 2021 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants