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

Build simple profiling tooling #412

Open
braxtonmckee opened this issue Jan 18, 2023 · 0 comments
Open

Build simple profiling tooling #412

braxtonmckee opened this issue Jan 18, 2023 · 0 comments
Labels
compiler Issue that does not affect the un-compiled subset of typed_python enhancement

Comments

@braxtonmckee
Copy link
Collaborator

For instance, a flag could be set that adds instrumentation to every compiled TP function counting every time we enter a function and every outgoing callsite. At each point, we'd end up with a new global variable (we'd have to add something to GlobalVariableDefinition to model this) containing a raw pointer to an integer and we'd just increment it nakedly every time we execute.

We could then walk back over the stats and figure out which function call sites were being used.

An alternative would be for each thread to have its own 'event pointer ring buffer' and we'd write events into the ring buffer, which could conceivably be richer data, since it would tell us the ordering of events and also let us use sampling to determine where a program was spending its time.

Either way, the goal would be to make a first step towards being able to tell where a TP program is spending its time.

@braxtonmckee braxtonmckee added enhancement compiler Issue that does not affect the un-compiled subset of typed_python labels Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Issue that does not affect the un-compiled subset of typed_python enhancement
Projects
None yet
Development

No branches or pull requests

1 participant