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

DO NOT MERGE! Temporarily patch in perf support to llvm. #456

Closed

Conversation

stuartarchibald
Copy link
Contributor

As title.

@stuartarchibald
Copy link
Contributor Author

Ping @seibert. Approximate instructions:

  1. conda build llvmdev
  2. conda build llvmlite
  3. conda create -n perf_tool -c numba <then either -c for a channel or --use-local for where the special builds are > llvmlite=0.28*_perf_tool numpy gcc_linux-64 gxx_linux-64 colorama pyyaml ipython python=3 numba
  4. source activate perf_tool
  5. NUMBA_ENABLE_PROFILING=1 perf record -o perf.data -g -k 1 python some_example_or_other.py
  6. perf inject --jit -i perf.data -o perf.jit.data
  7. Profit:
    • perf report -i perf.jit.data should work
    • perf annotate -i perf.jit.data should also work

Watch out for the dump directory ~/.debug/jit getting v. full, synthesized DSOs/maps are left there. There's a non-public environment variable referenced in the LLVM src, JITDUMPDIR, which can be set to move the aforementioned dump dir to somewhere else.

@stuartarchibald
Copy link
Contributor Author

Builds are on the Numba channel: -c numba/label/perf_tool llvmlite=0.28*perf_tool, direct drop in for llvmlite built from 0.280dev0 mainline. This:

conda create -n perf_tool  -c numba/label/perf_tool llvmlite=0.28*perf_tool numba

bypasses 1., 2. and 3. above.

@esc
Copy link
Member

esc commented Jan 13, 2021

@stuartarchibald is this PR still needed? If not, do we want to include the instructions for using perf in the developer documentation for llvmlite?

@gmarkall gmarkall added this to the PR Backlog milestone Dec 21, 2021
@gmarkall
Copy link
Member

@stuartarchibald Can we close this now?

@stuartarchibald
Copy link
Contributor Author

@stuartarchibald Can we close this now?

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants