From f24a0a4aabad8c2f577a5c3cd2d9bff44b14fed2 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 8 Mar 2021 20:12:41 -0600 Subject: [PATCH] [nostalgia] Add trace init --- .tracy.json | 7 +++++++ src/nostalgia/player/main.cpp | 2 ++ src/nostalgia/studio/main.cpp | 2 ++ src/nostalgia/tools/pack.cpp | 2 ++ 4 files changed, 13 insertions(+) diff --git a/.tracy.json b/.tracy.json index 918a4672..30cdb020 100644 --- a/.tracy.json +++ b/.tracy.json @@ -1,4 +1,11 @@ { + "init_functions": [ + { + "bin_path": "/home/gary/projects/nostalgia/dist/linux-x86_64-debug/lib/ox/libOxTraceHook.so", + "function": "oxTraceInitHook", + "ignore_frames": 3 + } + ], "log_functions": [ { "bin_path": "/home/gary/projects/nostalgia/dist/linux-x86_64-debug/lib/ox/libOxTraceHook.so", diff --git a/src/nostalgia/player/main.cpp b/src/nostalgia/player/main.cpp index 1e45c5e5..b32805af 100644 --- a/src/nostalgia/player/main.cpp +++ b/src/nostalgia/player/main.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include @@ -54,6 +55,7 @@ static ox::Error run(ox::FileSystem *fs) { int main(int argc, const char **argv) { if (argc > 1) { + ox::trace::init(); auto path = argv[1]; auto fs = core::loadRomFs(path); auto err = run(fs); diff --git a/src/nostalgia/studio/main.cpp b/src/nostalgia/studio/main.cpp index 104d4336..c6077b66 100644 --- a/src/nostalgia/studio/main.cpp +++ b/src/nostalgia/studio/main.cpp @@ -9,12 +9,14 @@ #include #include #include +#include #include #include "mainwindow.hpp" using namespace nostalgia::studio; int main(int argc, char **args) { + ox::trace::init(); ox::ClArgs clargs(argc, const_cast(args)); QString argProfilePath = clargs.getString("profile", ":/profiles/nostalgia-studio.json").c_str(); diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index 44d24f03..7ab69a34 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "pack/pack.hpp" @@ -48,6 +49,7 @@ void run(ox::ClArgs args) { } int main(int argc, const char **args) { + ox::trace::init(); try { run(ox::ClArgs(argc, args)); } catch (const ox::Error &err) {