-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Add block cache tracer. #5410
Add block cache tracer. #5410
Conversation
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.
@HaoyuHuang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@HaoyuHuang has updated the pull request. Re-import the pull request |
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.
First pass.
@HaoyuHuang has updated the pull request. Re-import the pull request |
@HaoyuHuang has updated the pull request. Re-import the pull request |
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.
Another pass.
You may also need to update src.mk.
@HaoyuHuang has updated the pull request. Re-import the pull request |
@HaoyuHuang has updated the pull request. Re-import the pull request |
I updated src.mk. I also added the code to perform the downsampling. |
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've taken another pass and left some comments.
@HaoyuHuang has updated the pull request. Re-import the pull request |
Thanks for your comments. |
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 with a few minor, last comments.
Thanks @HaoyuHuang for the PR.
src.mk
Outdated
@@ -371,6 +372,7 @@ MAIN_SOURCES = \ | |||
tools/reduce_levels_test.cc \ | |||
tools/sst_dump_test.cc \ | |||
tools/trace_analyzer_test.cc \ | |||
trace_replay/block_cache_tracer_test.cc \ |
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.
You may also want to adjust the alignment of \
. It's not strictly required, but other lines are trying to align.
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.
My bad. I changed my editor to show indentation now. I updated it.
trace_replay/block_cache_tracer.h
Outdated
Status WriteHeader(); | ||
|
||
private: | ||
bool ShouldTrace(const BlockCacheTraceRecord& record); |
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.
bool ShouldTrace(const BlockCacheTraceRecord& record) const;
?
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.
Thanks. Updated.
@HaoyuHuang has updated the pull request. Re-import the pull request |
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.
@HaoyuHuang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@HaoyuHuang merged this pull request in aa71718. |
Summary: This PR adds a help class block cache tracer to read/write block cache accesses. It uses the trace reader/writer to perform this task. Pull Request resolved: facebook#5410 Differential Revision: D15612843 Pulled By: HaoyuHuang fbshipit-source-id: f30fd1e1524355ca87db5d533a5c086728b141ea
Summary: This PR adds a help class block cache tracer to read/write block cache accesses. It uses the trace reader/writer to perform this task. Pull Request resolved: facebook/rocksdb#5410 Differential Revision: D15612843 Pulled By: HaoyuHuang fbshipit-source-id: f30fd1e1524355ca87db5d533a5c086728b141ea Signed-off-by: Changlong Chen <levisonchen@live.cn>
Summary: This PR adds a help class block cache tracer to read/write block cache accesses. It uses the trace reader/writer to perform this task. Pull Request resolved: facebook/rocksdb#5410 Differential Revision: D15612843 Pulled By: HaoyuHuang fbshipit-source-id: f30fd1e1524355ca87db5d533a5c086728b141ea Signed-off-by: Changlong Chen <levisonchen@live.cn>
This PR adds a help class block cache tracer to read/write block cache accesses. It uses the trace reader/writer to perform this task.