Giter Club home page Giter Club logo

odin-tracy's Introduction

Tracy Profiler

A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.

This is a bindings/wrapper library for the Odin programming language.

image

image

image

0. Prerequisites

This assumes you are using the latest nightly build or GitHub master of the Odin compiler. Since Odin is still under development this means these bindings might break in the future. Please create an issue or PR if that happens.

1. Cloning the sources

git clone --recurse-submodules https://github.com/oskarnp/odin-tracy

Or if you already had this repo cloned:

git submodule update --init

2. Building the Tracy profiler server

Mac OS

Install dependencies

brew install pkg-config glfw freetype capstone

Build profiler server

cd tracy/profiler/build/unix
make release

Run profiler server

./tracy/profiler/build/unix/Tracy-release

Windows

Install dependencies

This will download and install external dependencies (glfw3, libcapstone, libfreetype) to vcpkg local directory. This writes files only to the vcpkg\vcpkg directory and makes no other changes on your machine.

cd tracy\vcpkg
install_vcpkg_dependencies.bat

Build profiler server

This requires Visual Studio installed. Open "x64 Native Tools Command Prompt for VS 20XX" and run commands below.

cd tracy\profiler\build\win32
msbuild Tracy.sln -t:Build -p:Configuration=Release

(or open solution with Visual Studio and build from there)

Run profiler server

x64\Release\Tracy.exe

Linux

Install dependencies

  • pkg-config
  • freetype2
  • capstone
  • glfw3 (glfw-x11)
    • (Only required if using LEGACY=1 below, otherwise not required and profiler server will use Wayland instead.)

Build profiler server

cd tracy/profiler/build/unix
make release LEGACY=1

Note

Remove LEGACY=1 above to use Wayland instead of GLFW.

Run profiler server

./tracy/profiler/build/unix/Tracy-release

3. Building the Tracy profiler client library

Mac OS

c++ -stdlib=libc++ -mmacosx-version-min=10.8 -std=c++11 -DTRACY_ENABLE -O2 -dynamiclib tracy/public/TracyClient.cpp  -o tracy.dylib

Windows

cl -MT -O2 -DTRACY_ENABLE -c tracy\public\TracyClient.cpp -Fotracy
lib tracy.obj

Linux

c++ -std=c++11 -DTRACY_ENABLE -O2 tracy/public/TracyClient.cpp -shared -fPIC -o tracy.so

4. (Optional) Run the demo application / profiler client

odin run demo -define:TRACY_ENABLE=true

and then click Connect in Tracy profiler server.

Tip

Run the profiled application (e.g. demo) in privileged mode (sudo/administrator) to enable even more features in Tracy.


Important

For more details on how to use Tracy, please refer to the official manual.

odin-tracy's People

Contributors

fourteenbrush avatar jajo-11 avatar macsmol avatar oskarnp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

odin-tracy's Issues

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.