-
Notifications
You must be signed in to change notification settings - Fork 55
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
ENH: Allow checking vmprof output in progress. #139
base: master
Are you sure you want to change the base?
Conversation
#ifndef RPYTHON_VMPROF | ||
PyObject *all_done_uids = NULL; | ||
if (all_code_uids != NULL) { | ||
all_done_uids = PySet_New(NULL); |
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.
in this function we cant use CPython API. It will not work on PyPy. I have used khash for the native symbols already (to avoid duplication). We can reuse khash for that.
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.
Yeah, here's my confusion - we already use CPython API further down the line, similarly if an #ifndef RPYTHON_VMPROF
block. :(
...so, is the right fix to change both?
Or is the other one special enough to be kept around?
fileobj = self.fileobj | ||
|
||
self.detect_file_sizes() | ||
self.read_static_header() | ||
|
||
function_lookup = { |
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.
Should have been done this way some time ago...
self.profile_memory = False | ||
self.profile_lines = None | ||
self.profile_memory = None | ||
self.adr_size = None |
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.
can we change adr_size or remove it? it is simply the len of state.virtual_ips... it should not be confused with the byte size of the addresses contained in the profile. We could turn that into a method with a longer name...
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.
Ah, that particular thing I added literally only for one test, I suppose we could rework that test instead to use a lower-level API?
This PR isn't quite ready yet, but I thought I'd start early, then we can talk about the preferred approach as I'm hacking away. Related to #127.
Two improvements are made so far:
Reasoning:
The current implementation of (2) seems slightly iffy to me, is it okay to use a PySet here, or should this be ported over to the khash thing? Any other comments? ;)