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

Tracyprofiler #778

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b9d6333
Add tracy extern folder
nico-abram May 24, 2020
50e193f
Add Tracy profiler in cmake
nico-abram May 24, 2020
589e6a0
Minimal tracy integration
nico-abram May 24, 2020
891a761
Only set Mt on windows
nico-abram May 24, 2020
163c9b7
Fix compile in relwithdebug
nico-abram May 24, 2020
85f631b
More Tracy integration
nico-abram May 24, 2020
bb2d244
Default tracy to off
nico-abram May 25, 2020
5abe8a6
Merge branch 'develop' into tracyprofiler
nico-abram May 25, 2020
01996ea
Update DownloadManager.cpp
nico-abram May 25, 2020
993c15a
Merge branch 'develop' into tracyprofiler
nico-abram May 31, 2020
a404e9f
Remove accidental FORCE on cmake tracy option
nico-abram May 31, 2020
0fdace8
Move tracy CMake flag to extrn
jameskr97 May 31, 2020
4f7cf8a
Move another thing from root CMakeLists to tracy/CMakeLists
nico-abram May 31, 2020
2d95da4
Make tracy only start accumulating profiling data when we connect the…
nico-abram May 31, 2020
175ad67
Update tracy to 0.7
nico-abram Jun 13, 2020
a9be46b
Merge branch 'develop' into tracyprofiler
nico-abram Jun 13, 2020
50ab192
Fix typo in conflict fix
nico-abram Jun 13, 2020
69f7f1f
Merge branch 'develop' into tracyprofiler
nico-abram Jul 2, 2020
23c1fff
Merge branch 'develop' into tracyprofiler
poco0317 Jul 8, 2020
d2d17bf
merge issues
poco0317 Jul 8, 2020
4239f3b
Merge branch 'develop' into tracyprofiler
nico-abram Oct 27, 2020
5714418
Fix stuff in merge from develop into tracy
nico-abram Oct 28, 2020
e7c8bcb
Merge remote-tracking branch 'origin/develop' into tracyprofiler
poco0317 Dec 29, 2020
8b0c291
fix scuffed merge
poco0317 Dec 29, 2020
926b89e
update tracy to 0.7.4
poco0317 Dec 29, 2020
3b530e3
reenable linking to dbghelp in msvc for tracy if tracy is enabled
poco0317 Dec 29, 2020
ade070d
add more ZoneScoped and attempt to show name of Actors in Zones
poco0317 Dec 30, 2020
84b8b09
Update tracy to 0.7.6
Mar 27, 2021
6c635c0
Merge pull request #965 from g-robertson/tracyprofiler
poco0317 Mar 28, 2021
72415fa
Merge branch 'develop' into tracyprofiler
nico-abram May 3, 2021
40d386b
Merge branch 'develop' into tracyprofiler
nico-abram May 9, 2022
e9dc426
Merge branch 'develop' into tracyprofiler
nico-abram Sep 12, 2022
3955395
Merge branch 'develop' into tracyprofiler
nico-abram Sep 19, 2022
2e36175
Merge branch 'develop' into tracyprofiler
nico-abram Oct 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ target_link_libraries(Etterna PRIVATE pcre)
target_link_libraries(Etterna PRIVATE libmad)
target_link_libraries(Etterna PRIVATE stb)
target_link_libraries(Etterna PRIVATE libcurl)
target_link_libraries(Etterna PRIVATE tracy)
target_link_libraries(Etterna PRIVATE fmt::fmt)
target_link_libraries(Etterna PRIVATE plog::plog)
target_link_libraries(Etterna PRIVATE nowide::nowide)
Expand Down
5 changes: 4 additions & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ set(CLANG_FORMAT_CMD OFF CACHE BOOL "" FORCE) # Disable discord clang-format
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # Disable discord examples
add_subdirectory(discord-rpc)

## Tracy Profiler
set(ENABLE_TRACY_PROFILER OFF CACHE BOOL "")
add_subdirectory(tracy)
## plog
set(PLOG_BUILD_SAMPLES OFF)
add_subdirectory(plog)
Expand Down Expand Up @@ -75,7 +78,7 @@ list(APPEND EXT_TARGETS
discord-rpc muFFT
zlib libmad pcre
ogg vorbis glfw
libcurl fmt)
libcurl fmt tracy)

list(APPEND LUA_TARGETS luajit libluajit minilua buildvm)

Expand Down
1 change: 1 addition & 0 deletions extern/tracy/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: wolfpld
Binary file added extern/tracy/.github/sponsor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions extern/tracy/.github/workflows/gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: gcc

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-latest]

steps:
- uses: actions/checkout@v2
- name: Install linux libraries
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: sudo apt-get update && sudo apt-get -y install libglfw3-dev libgtk-3-dev libcapstone-dev libtbb-dev
- name: Install macos libraries
if: ${{ matrix.os == 'macOS-latest' }}
run: brew install capstone tbb pkg-config glfw
- name: Profiler GUI
run: make -j -C profiler/build/unix debug release
- name: Update utility
run: make -j -C update/build/unix debug release
- name: Capture utility
run: make -j -C capture/build/unix debug release
- name: Csvexport utility
run: make -j -C csvexport/build/unix debug release
- name: Import-chrome utility
run: make -j -C import-chrome/build/unix debug release
- name: Library
run: make -j -C library/unix debug release
- name: Test application
run: |
make -j -C test
make -j -C test clean
make -j -C test TRACYFLAGS=-DTRACY_ON_DEMAND
make -j -C test clean
make -j -C test TRACYFLAGS="-DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME"
28 changes: 28 additions & 0 deletions extern/tracy/.github/workflows/latex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Manual

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Fix stupidity
run: |
cp AUTHORS AUTHORS.
cp LICENSE LICENSE.
- name: Compile LaTeX
uses: xu-cheng/latex-action@v2
with:
working_directory: manual
root_file: tracy.tex
- uses: actions/upload-artifact@v2
with:
name: manual
path: manual/tracy.pdf
57 changes: 57 additions & 0 deletions extern/tracy/.github/workflows/msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: MSVC

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- uses: microsoft/[email protected]
- name: Integrate vcpkg
run: vcpkg integrate install
- name: Build vcpkg libraries
run: vcpkg install freetype glfw3 capstone[arm,arm64,x86] --triplet x64-windows-static
- name: Profiler GUI Debug
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Debug /property:Platform=x64
- name: Profiler GUI Release
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Update utility Debug
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Debug /property:Platform=x64
- name: Update utility Release
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Capture utility Debug
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Debug /property:Platform=x64
- name: Capture utility Release
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Csvexport utility Debug
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Debug /property:Platform=x64
- name: Csvexport utility Release
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Import-chrome utility Debug
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Debug /property:Platform=x64
- name: Import-chrome utility Release
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Library
run: msbuild .\library\win32\TracyProfiler.vcxproj /property:Configuration=Release /property:Platform=x64
- name: Package binaries
run: |
mkdir bin
mkdir bin\dev
copy profiler\build\win32\x64\Release\Tracy.exe bin
copy update\build\win32\x64\Release\update.exe bin
copy capture\build\win32\x64\Release\capture.exe bin
copy import-chrome\build\win32\x64\Release\import-chrome.exe bin
copy csvexport\build\win32\x64\Release\csvexport.exe bin
copy library\win32\x64\Release\TracyProfiler.dll bin\dev
copy library\win32\x64\Release\TracyProfiler.lib bin\dev
7z a Tracy.7z bin
- uses: actions/upload-artifact@v2
with:
path: Tracy.7z
39 changes: 39 additions & 0 deletions extern/tracy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.vs
*.opendb
*.db
*.vcxproj.user
x64
Release
Debug
_build
_compiler
tools/*
*.d
*.o
*.so
*.swp
imgui.ini
test/tracy_test
test/tracy_test.exe
*/build/unix/*-*
manual/t*.aux
manual/t*.log
manual/t*.out
manual/t*.pdf
manual/t*.synctex.gz
manual/t*.toc
manual/t*.bbl
manual/t*.blg
profiler/build/win32/packages
profiler/build/win32/Tracy.aps
# include the vcpkg install script but not the files it produces
vcpkg/*
!vcpkg/install_vcpkg_dependencies.bat
.deps/
.dirstamp
.vscode/

/_*/**
/**/__pycache__/**
extra/vswhere.exe
extra/tracy-build
15 changes: 15 additions & 0 deletions extern/tracy/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Bartosz Taudul <[email protected]>
Kamil Klimek <[email protected]> (initial find zone implementation)
Bartosz Szreder <[email protected]> (view/worker split)
Arvid Gerstmann <[email protected]> (compatibility fixes)
Rokas Kupstys <[email protected]> (compatibility fixes, initial CI work, MingW support)
Till Rathmann <[email protected]> (DLL support)
Sherief Farouk <[email protected]> (compatibility fixes)
Dedmen Miller <[email protected]> (find zone bug fixes, improvements)
Michał Cichoń <[email protected]> (OSX call stack decoding backport)
Thales Sabino <[email protected]> (OpenCL support)
Andrew Depke <[email protected]> (Direct3D 12 support)
Simonas Kazlauskas <[email protected]> (OSX CI, external bindings)
Jakub Žádník <[email protected]> (csvexport utility)
Andrey Voroshilov <[email protected]> (multi-DLL fixes)
Benoit Jacob <[email protected]> (Android improvements)
41 changes: 41 additions & 0 deletions extern/tracy/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
project(TracyClient)

file(GLOB_RECURSE TRACY_SRC
common/*.cpp client/*.cpp TracyClient.cpp
)

file(GLOB_RECURSE TRACY_HPP
common/*.hpp client/*.hpp Tracy.hpp
)

source_group("Source Files" FILES ${TRACY_SRC})
source_group("Header Files" FILES ${TRACY_HPP})

add_library("tracy" ${TRACY_SRC})

if(WIN32)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /MTd")

foreach(CompilerFlag
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELEASE
CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELEASE)
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach()
endif()

if(ENABLE_TRACY_PROFILER)
target_compile_definitions("tracy" PUBLIC TRACY_ENABLE TRACY_ON_DEMAND)
target_compile_definitions(Etterna PUBLIC TRACY_ENABLE TRACY_ON_DEMAND)
endif()

set_property(TARGET "tracy" PROPERTY FOLDER "External Libraries")

target_include_directories("tracy" PUBLIC .)
27 changes: 27 additions & 0 deletions extern/tracy/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Tracy Profiler (https://github.com/wolfpld/tracy) is licensed under the
3-clause BSD license.

Copyright (c) 2017-2021, Bartosz Taudul <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the <organization> nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading