Coder Social home page Coder Social logo

mono-jitdump's Introduction

mono-profiler-jitdump

This is a simple Mono profiler plugin that writes jit-dump compatible data files on OSX (and Linux). It interfaces with compatible profilers such as samply (OSX + Linux) or perf (Linux) to provide them with JIT method information at runtime.

Install Rust and cargo via https://rustup.rs .

Install samply from source (via cargo install samply -- prebuilt version has issues):

git clone http://github.com/mstange/samply
cd samply/samply
cargo install --path .

Samply automatically handles domain reload (which causes all jit methods to be evicted) by simply evicting any jit method information if a new jit code block is received that overlaps any existing methods. Overlapping methods are removed from the data table.

It is not possible to attach to an existing process to begin profiling. samply must launch the process.

To verify that the profiler module is being loaded, Editor.log will contain ## Initialized jitdump profiler module.

Building and installing the profiler plugin

You need to build this profiler plugin and make it available to Unity.

  1. make
  2. cd path/to/Unity.app/Contents/lib (if the lib directory does not exist, create it)
  3. ln -s path-to-this-repo/build/libmono-profiler-jitdump.dylib . (or cp)

Profiling

Use samply record, together with passing -monoProfiler jitdump to Unity:

samply record --save-only -o profile-data.json -- path-to/Unity.app/Contents/MacOS/Unity -monoProfiler jitdump -projectpath path/to/Project
[... do things, exit or kill the process ...]
samply load profile-data.json

In the resulting view, JIT symbols will appear as purple (in the "JIT" category). Samply also profiles all threads and child processes, meaning you will see full profiles for out of process asset import, shader compilation, and similar.

mono-jitdump's People

Contributors

vvuk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.