-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ARROW-16981: [C++] Expose jemalloc statistics for logging #13516
Conversation
|
b58b1d9
to
3ccabc3
Compare
9dac9b4
to
307063d
Compare
@pitrou any idea why is overloading not allowed? It builds and works ok locally. |
presumably because uint64_t and size_t are actually the same type on those platforms (also, we use raw pointers for out parameters, not references, typically) |
2224027
to
d1b68ed
Compare
Do we want Python binding for these as well? |
I don't know, why not? Can be a separate JIRA, though. |
Added ARROW-17685 for the Python wrapper. |
1df8c26
to
f06e125
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.
Here are some potential changes for implementing the callback API with std::function
, which uses closures instead of a client-provided void*
. I updated the relevant tests as well.
Hopefully this is the correct method of suggesting patches... the github diffs appear to be against the base branch, not the latest commit.
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
This looks good to me! Thanks a lot @benibus !
Well this was pretty nice for me but maybe extra work for you :). I added you as a collaborator to my fork in case you'd want to push more changes to this branch and avoid the UI. I've also linted and rebased. |
Co-authored-by: Ben Harkins <60872452+benibus@users.noreply.github.com>
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 for the update. Some further comments below, but looks good on the principle.
auto cb_wrapper = [](void* opaque, const char* str) { | ||
(*static_cast<std::function<void(const char*)>*>(opaque))(str); | ||
}; | ||
if (write_cb) { |
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.
Is this required? I think the caller should make sure that write_cb
is initialized.
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 think not but not sure. I removed it for now. @benibus do you think this would be needed?
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Thanks for the review @pitrou! I've addressed your points. |
Benchmark runs are scheduled for baseline = bd433c0 and contender = 8d11e3d. 8d11e3d is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This is to resolve [ARROW-16981](https://issues.apache.org/jira/browse/ARROW-16981). Lead-authored-by: Rok <rok@mihevc.org> Co-authored-by: Rok Mihevc <rok@mihevc.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
This is to resolve [ARROW-16981](https://issues.apache.org/jira/browse/ARROW-16981). Lead-authored-by: Rok <rok@mihevc.org> Co-authored-by: Rok Mihevc <rok@mihevc.org> Signed-off-by: Antoine Pitrou <antoine@python.org>
This is to resolve ARROW-16981.