Skip to content

How to start? (Programmers Setup)

Vadim Slyusarev edited this page Jan 12, 2020 · 3 revisions

Installation

Download and install Visual Studio 2017 Community Edition (Free)
https://visualstudio.microsoft.com/vs/express/

[Optional] Vulkan SDK (required for a Vulkan sample)

Repository

  • Create a Fork
  • Clone a local copy git clone https://github.com/bombomby/optick.git
  • Create a new Pull Request from your local copy to the master if you want to share any fixes or improvements

Generate Projects (Windows)

Run tools/GenerateProjects.bat file to generate project files.

Alternatively you could generated a solution with selected set of features:
Basic: tools\Windows\premake5.exe vs2017
Basic+Fibers: tools\Windows\premake5.exe --Fibers vs2017
Basic+GPU: tools\Windows\premake5.exe --DX12 --Vulkan vs2017
All: tools\Windows\premake5.exe --DX12 --Vulkan --Fibers vs2017

Generate Projects (Linux)

./tools/Linux/premake5 gmake && pushd build/gmake/ && make config=release_x64 && popd

Generate Projects (MacOS)

./tools/MacOS/premake5 gmake && pushd build/gmake/ && make config=release_x64 && popd

Open Runtime Solution in Visual Studio

Optick uses ETW for kernel tracing which requires administrator privileges for the runtime application that you are profiling.
If you run your application from Visual Studio - your application inherits privileges from the Visual Studio.
So we'll need to run Visual Studio 2017 as Administrator:

Then open solution from Visual Studio (Ctrl+O):
Build\vs2017\Optick.sln

Select ConsoleApp as a startup project and run the app.
There are a couple of other samples in the same solution that you could check:

  • ConsoleApp (OS: Windows, Linux, MacOS)
  • WindowsD3D12 (OS: Windows, GAPI: DirectX12)
  • WindowsVulkan (OS: Windows, GAPI: Vulkan)

Open OptickApp (GUI) Solution in Visual Studio

OptickApp doesn't require administrator privileges.
Solution file is here:
gui\OptickApp_vs2017.sln

Taking a capture

Once you have a running sample - press "Start Profiling Session" button in Optick.

Wait for a couple of seconds and press "Stop Profiling Session" to stop the capture and transfer all the data to the GUI.
Once you have a capture - press "Save Capture" button to save it to your hard drive.

OptickApp command line args

You could significantly speed up the development process by passing path to a capture as command line args:

Brofiler will automatically open specified capture on load.

WPF Reference

Brofiler uses MahApps library - feel free to use any controls from there.
Documentation is here: https://mahapps.com

Brofiler also has an integrated pack of vector icons based on ModernUIIcons.
You could search for all the available icons here: http://modernuiicons.com