Profiling of Python plugins / code

Open
#3,083 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by tracing Binary Ninja startup and command-line handling to find how Python plugins, snippets, and scripts are invoked through the Python interpreter. Determine how a command-line profiling option should cover those invocations cross-platform, then verify that it produces a usable cProfile result for each supported execution path.

Written by the indexing model from the issue text.

Description

Component: API Effort: Medium Impact: Medium

What is the feature you'd like to have?
I'd like to be able to start binaryninja using e.g. a command-line flag that causes any python plugins, snippets, or scripts run from the command line -- basically anything that's invoked through the python interpreter -- to be run in a profiler such as cProfile.

Is your feature request related to a problem?
I am somewhat often debugging performance issues related to the python API or plugins using it -- see e.g. #3082, or code in my or third-party plugins. In those cases, I'd like to be able to extract a profile to pinpoint performance issues.

Are any alternative solutions acceptable?
I can't think of any good way to do this currently that works cross-platform. On Linux I guess you could use bpftrace and somehow instrument the python interpreter.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.