Hi,
I’m integrating Tracy profiler ( https://github.com/wolfpld/tracy/ ) into Urho3D. If it’s only the client side integration, things should be neat. Tracy profiler should be a good plus to the engine.
It’s working great on Windows -
but, I find a compiling issue for Android:
D:\AndroidDev\AndroidSDK\ndk\22.0.7026061\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi18 --gcc-toolchain=D:/AndroidDev/AndroidSDK/ndk/22.0.7026061/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=D:/AndroidDev/AndroidSDK/ndk/22.0.7026061/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DNOMINMAX=1 -DTRACY_ENABLE=1 -DURHO3D_ANGELSCRIPT -DURHO3D_FILEWATCHER -DURHO3D_IK -DURHO3D_LOGGING -DURHO3D_LUA -DURHO3D_NAVIGATION -DURHO3D_NETWORK -DURHO3D_PHYSICS -DURHO3D_PROFILING -DURHO3D_STATIC_DEFINE -DURHO3D_THREADING -DURHO3D_URHO2D -DURHO3D_WEBP -DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE -D_USE_MATH_DEFINES -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -std=c++11 -Wno-invalid-offsetof -Qunused-arguments -fcolor-diagnostics -Wno-argument-outside-range -O0 -fno-limit-debug-info -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT Source/ThirdParty/Tracy/CMakeFiles/Tracy.dir/client/TracySysTrace.cpp.o -MF Source\ThirdParty\Tracy\CMakeFiles\Tracy.dir\client\TracySysTrace.cpp.o.d -o Source/ThirdParty/Tracy/CMakeFiles/Tracy.dir/client/TracySysTrace.cpp.o -c ../../../../../../Source/ThirdParty/Tracy/client/TracySysTrace.cpp
../../../../../../Source/ThirdParty/Tracy/client/TracySysTrace.cpp:638:21: error: use of undeclared identifier '__NR_perf_event_open'
return syscall( __NR_perf_event_open, hw_event, pid, cpu, group_fd, flags );
^
1 error generated.
[18/945] Building CXX object Source/ThirdParty/Tracy/CMakeFiles/Tracy.dir/client/TracyProfiler.cpp.o
ninja: build stopped: subcommand failed.
NDK 21.0.6113669 and 22.0.7026061 have been tried.
Any ideas?
Thanks!
so even latest SDK does not provide all windows APIs, some of which Tracy uses. What we have to do is load those APIs using LoadLibrary+GetProcAddress.