<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/VideoCommon/PerformanceMetrics.h, branch master</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>PerformanceMetrics: Fix compiling using clang&amp;libstdc++</title>
<updated>2026-07-13T00:26:49+00:00</updated>
<author>
<name>Joshua Vandaële</name>
<email>joshua@vandaele.software</email>
</author>
<published>2026-07-13T00:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=55761d9e6deca298a6f97941f03ffa56dc36bec3'/>
<id>55761d9e6deca298a6f97941f03ffa56dc36bec3</id>
<content type='text'>
When using clang and libstdc++, compiling fails with these errors:

```
FAILED: [code=1] Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o
/usr/sbin/ccache /usr/sbin/clang++ -DAUTOUPDATE=1 -DDATA_DIR=\"/usr/local/share/dolphin-emu/\" -DHAS_OPENGL -DHAS_VULKAN -DHAVE_CPPIPC -DHAVE_LIBSYSTEMD -DIMGUI_USER_CONFIG=\"imgui_user_config.h\" -DLZMA_API_STATIC -DOFF -DPUGIXML_NO_EXCEPTIONS -DRC_CLIENT_SUPPORTS_HASH -DSFML_STATIC -DSPNG_STATIC -DTINYGLTF_NOEXCEPTION -DTINYGLTF_NO_EXTERNAL_IMAGE -DTINYGLTF_USE_CPP14 -DUSE_ANALYTICS=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -DUSE_RETRO_ACHIEVEMENTS -DZSTD_MULTITHREAD -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86_64=1 -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/dolphin-local/Source/Core -I/dolphin-local/Externals/picojson -I/dolphin-local/build/release/x64/Source/Core -I/dolphin-local/Externals/enet/enet/include -I/dolphin-local/Externals/fmt/fmt/include -I/dolphin-local/Externals/mbedtls/include -I/dolphin-local/Externals/minizip-ng/minizip-ng -I/dolphin-local/Externals/liblzma/api -I/dolphin-local/Externals/zstd/zstd/build/cmake/../../lib -I/dolphin-local/Externals/libiconv/include -I/dolphin-local/build/release/x64/Externals/libiconv/lib -I/dolphin-local/Externals/libiconv/libcharset/include -I/dolphin-local/build/release/x64/Externals/libiconv/libcharset -I/dolphin-local/Externals/SFML/SFML/include -I/dolphin-local/Externals/bzip2/bzip2 -I/dolphin-local/Externals/expr/include -I/dolphin-local/Externals/hidapi/hidapi-src/hidapi -I/dolphin-local/Externals/pugixml/pugixml/src -I/dolphin-local/Externals/glslang/glslang/glslang/.. -I/dolphin-local/build/release/x64/include -I/dolphin-local/Externals/rcheevos -I/dolphin-local/Externals/libspng/libspng/spng -I/dolphin-local/Externals/xxhash/xxHash -I/dolphin-local/Externals/imgui -I/dolphin-local/Externals/imgui/imgui -I/dolphin-local/Externals/implot/implot -I/dolphin-local/Externals/glslang/glslang/SPIRV/.. -I/dolphin-local/Externals/tinygltf -isystem /dolphin-local/Externals/libusb/libusb/libusb -isystem /dolphin-local/Externals/glslang/glslang -isystem /dolphin-local/Externals/glslang/glslang/Public -isystem /dolphin-local/Externals/glslang -Qunused-arguments -fcolor-diagnostics -O3 -DNDEBUG -std=c++23 -msse2 -fdiagnostics-color -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wshadow -Wshadow-field-in-constructor -Winit-self -Wmissing-declarations-Wmissing-variable-declarations -Werror=format -Wno-trigraphs -MD -MT Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o -MF Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o.d -o Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o -c /dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.cpp
In file included from /dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.cpp:4:
/dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.h:69:51: error: no matching constructor for initialization of 'std::atomic&lt;FrameBufferSize&gt;'
   69 |   std::atomic&lt;FrameBufferSize&gt; m_frame_buffer_size{};
      |                                                   ^~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:237:17: note: candidate constructor not viable: constraints not satisfied
  237 |       constexpr atomic() noexcept(is_nothrow_default_constructible_v&lt;_Tp&gt;)
      |                 ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:238:11: note: because 'is_default_constructible_v&lt;PerformanceMetrics::FrameBufferSize&gt;' evaluated to false
  238 |         requires is_default_constructible_v&lt;_Tp&gt;
      |                  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:246:7: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  246 |       atomic(const atomic&amp;) = delete;
      |       ^      ~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:252:17: note: candidate constructor not viable: requires single argument '__i', but no arguments were provided
  252 |       constexpr atomic(_Tp __i) noexcept : _M_i(__i)
      |                 ^      ~~~~~~~
1 error generated.
```

This was tested and occurs on both Arch and Alpine Linux.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using clang and libstdc++, compiling fails with these errors:

```
FAILED: [code=1] Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o
/usr/sbin/ccache /usr/sbin/clang++ -DAUTOUPDATE=1 -DDATA_DIR=\"/usr/local/share/dolphin-emu/\" -DHAS_OPENGL -DHAS_VULKAN -DHAVE_CPPIPC -DHAVE_LIBSYSTEMD -DIMGUI_USER_CONFIG=\"imgui_user_config.h\" -DLZMA_API_STATIC -DOFF -DPUGIXML_NO_EXCEPTIONS -DRC_CLIENT_SUPPORTS_HASH -DSFML_STATIC -DSPNG_STATIC -DTINYGLTF_NOEXCEPTION -DTINYGLTF_NO_EXTERNAL_IMAGE -DTINYGLTF_USE_CPP14 -DUSE_ANALYTICS=1 -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -DUSE_RETRO_ACHIEVEMENTS -DZSTD_MULTITHREAD -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86_64=1 -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/dolphin-local/Source/Core -I/dolphin-local/Externals/picojson -I/dolphin-local/build/release/x64/Source/Core -I/dolphin-local/Externals/enet/enet/include -I/dolphin-local/Externals/fmt/fmt/include -I/dolphin-local/Externals/mbedtls/include -I/dolphin-local/Externals/minizip-ng/minizip-ng -I/dolphin-local/Externals/liblzma/api -I/dolphin-local/Externals/zstd/zstd/build/cmake/../../lib -I/dolphin-local/Externals/libiconv/include -I/dolphin-local/build/release/x64/Externals/libiconv/lib -I/dolphin-local/Externals/libiconv/libcharset/include -I/dolphin-local/build/release/x64/Externals/libiconv/libcharset -I/dolphin-local/Externals/SFML/SFML/include -I/dolphin-local/Externals/bzip2/bzip2 -I/dolphin-local/Externals/expr/include -I/dolphin-local/Externals/hidapi/hidapi-src/hidapi -I/dolphin-local/Externals/pugixml/pugixml/src -I/dolphin-local/Externals/glslang/glslang/glslang/.. -I/dolphin-local/build/release/x64/include -I/dolphin-local/Externals/rcheevos -I/dolphin-local/Externals/libspng/libspng/spng -I/dolphin-local/Externals/xxhash/xxHash -I/dolphin-local/Externals/imgui -I/dolphin-local/Externals/imgui/imgui -I/dolphin-local/Externals/implot/implot -I/dolphin-local/Externals/glslang/glslang/SPIRV/.. -I/dolphin-local/Externals/tinygltf -isystem /dolphin-local/Externals/libusb/libusb/libusb -isystem /dolphin-local/Externals/glslang/glslang -isystem /dolphin-local/Externals/glslang/glslang/Public -isystem /dolphin-local/Externals/glslang -Qunused-arguments -fcolor-diagnostics -O3 -DNDEBUG -std=c++23 -msse2 -fdiagnostics-color -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wshadow -Wshadow-field-in-constructor -Winit-self -Wmissing-declarations-Wmissing-variable-declarations -Werror=format -Wno-trigraphs -MD -MT Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o -MF Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o.d -o Source/Core/VideoCommon/CMakeFiles/videocommon.dir/PerformanceMetrics.cpp.o -c /dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.cpp
In file included from /dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.cpp:4:
/dolphin-local/Source/Core/VideoCommon/PerformanceMetrics.h:69:51: error: no matching constructor for initialization of 'std::atomic&lt;FrameBufferSize&gt;'
   69 |   std::atomic&lt;FrameBufferSize&gt; m_frame_buffer_size{};
      |                                                   ^~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:237:17: note: candidate constructor not viable: constraints not satisfied
  237 |       constexpr atomic() noexcept(is_nothrow_default_constructible_v&lt;_Tp&gt;)
      |                 ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:238:11: note: because 'is_default_constructible_v&lt;PerformanceMetrics::FrameBufferSize&gt;' evaluated to false
  238 |         requires is_default_constructible_v&lt;_Tp&gt;
      |                  ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:246:7: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  246 |       atomic(const atomic&amp;) = delete;
      |       ^      ~~~~~~~~~~~~~
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/16/../../../../include/c++/16/atomic:252:17: note: candidate constructor not viable: requires single argument '__i', but no arguments were provided
  252 |       constexpr atomic(_Tp __i) noexcept : _M_i(__i)
      |                 ^      ~~~~~~~
1 error generated.
```

This was tested and occurs on both Arch and Alpine Linux.
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon: Use XFB for internal resolution stats</title>
<updated>2026-07-05T07:50:13+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2026-06-19T10:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=c958dbc46cd93b24aa9c63332739b4040880c711'/>
<id>c958dbc46cd93b24aa9c63332739b4040880c711</id>
<content type='text'>
fb4ff3e added a statistics option to show the internal resolution, but
it just showed the total size of the EFB (which is always 640x528) times
the IR scale, so it didn't convey any useful information.

This commit instead makes the option use the size of the last XFB copy
(not multiplied by the IR scale), which changes based on the game's
rendering resolution.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fb4ff3e added a statistics option to show the internal resolution, but
it just showed the total size of the EFB (which is always 640x528) times
the IR scale, so it didn't convey any useful information.

This commit instead makes the option use the size of the last XFB copy
(not multiplied by the IR scale), which changes based on the game's
rendering resolution.
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon: Added an option to showcase internal resolution, EFB width x height as screen overlay. Option to turn it on is a checkbox in screen on the OSD settings, in debug. This supports enhancements.</title>
<updated>2026-04-19T21:19:21+00:00</updated>
<author>
<name>Elyas Hue</name>
<email>elyas.hue@telecom-paris.fr</email>
</author>
<published>2026-04-14T08:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=fb4ff3e51b2c41f9fc44116916fc2deb1cfa366a'/>
<id>fb4ff3e51b2c41f9fc44116916fc2deb1cfa366a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move PerformanceMetrics from global variable to System</title>
<updated>2026-03-14T14:42:21+00:00</updated>
<author>
<name>Mihai Brodschi</name>
<email>m.brodschi@gmail.com</email>
</author>
<published>2026-03-14T13:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=f9c3f06f0a03cbff599bb9a601454fc1ae440a69'/>
<id>f9c3f06f0a03cbff599bb9a601454fc1ae440a69</id>
<content type='text'>
This avoids the static initialization order fiasco between Core and VideoCommon

Co-authored-by: Jordan Woyak &lt;jordan.woyak@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids the static initialization order fiasco between Core and VideoCommon

Co-authored-by: Jordan Woyak &lt;jordan.woyak@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PerformanceMetrics: Use HookableEvent for state changed callback</title>
<updated>2026-03-07T20:50:59+00:00</updated>
<author>
<name>Dentomologist</name>
<email>dentomologist@gmail.com</email>
</author>
<published>2026-03-07T20:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=252ec7452c4c908537036215c1888f5c5d596bd7'/>
<id>252ec7452c4c908537036215c1888f5c5d596bd7</id>
<content type='text'>
Use the normal state changed `HookableEvent` instead of having
`Core::NotifyStateChanged` call `g_perf_metrics.OnEmulationStateChanged`
directly.

The direct call was added in bad78cfed416d89ceb6b0acf6c134d3691b3d624 to
avoid a crash. At the time state changed callbacks were stored in a
vector, and the crash was caused by `g_perf_metric`'s destructor trying
to remove the callback from the already-destroyed vector.

Later a97627e736ff352e031123519c799e65cc98b32c switched state changed
callbacks to use `HookableEvent`, which is specifically designed to
handle the case where a hook outlives its associated event.

Since the workaround is no longer necessary replace it with a standard
`EventHook`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the normal state changed `HookableEvent` instead of having
`Core::NotifyStateChanged` call `g_perf_metrics.OnEmulationStateChanged`
directly.

The direct call was added in bad78cfed416d89ceb6b0acf6c134d3691b3d624 to
avoid a crash. At the time state changed callbacks were stored in a
vector, and the crash was caused by `g_perf_metric`'s destructor trying
to remove the callback from the already-destroyed vector.

Later a97627e736ff352e031123519c799e65cc98b32c switched state changed
callbacks to use `HookableEvent`, which is specifically designed to
handle the case where a hook outlives its associated event.

Since the workaround is no longer necessary replace it with a standard
`EventHook`.
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon/PerformanceMetrics: Display current offset between the latest frame presentation time and the intended presentation time in the "Show Frame Times" box.</title>
<updated>2025-11-12T02:01:52+00:00</updated>
<author>
<name>Jordan Woyak</name>
<email>jordan.woyak@gmail.com</email>
</author>
<published>2025-10-28T04:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=bf61c890cafc494def3a30ec06b742571b20b8d9'/>
<id>bf61c890cafc494def3a30ec06b742571b20b8d9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Core, VideoCommon: Fix crash at shutdown due to destructor ordering</title>
<updated>2025-04-28T04:11:53+00:00</updated>
<author>
<name>Mihai Brodschi</name>
<email>m.brodschi@gmail.com</email>
</author>
<published>2025-04-27T14:33:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=bad78cfed416d89ceb6b0acf6c134d3691b3d624'/>
<id>bad78cfed416d89ceb6b0acf6c134d3691b3d624</id>
<content type='text'>
Previously, PerformanceTracker registered a callback to be updated on
emulation state changes. PerformanceTrackers live in a global variable
(g_perf_metrics) within libvideocommon. The callback was stored in a
global variable in libcore. This created a race condition at shutdown
between these libraries, when the PerfTracker's destructor tried to
unregister the callback.
Notify the PerfTracker directly from libcore, without callbacks, since
Core.cpp already references g_perf_metrics explicitly. Also rename
Core::CallOnStateChangedCallbacks to NotifyStateChanged to better
reflect what it's doing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, PerformanceTracker registered a callback to be updated on
emulation state changes. PerformanceTrackers live in a global variable
(g_perf_metrics) within libvideocommon. The callback was stored in a
global variable in libcore. This created a race condition at shutdown
between these libraries, when the PerfTracker's destructor tried to
unregister the callback.
Notify the PerfTracker directly from libcore, without callbacks, since
Core.cpp already references g_perf_metrics explicitly. Also rename
Core::CallOnStateChangedCallbacks to NotifyStateChanged to better
reflect what it's doing.
</pre>
</div>
</content>
</entry>
<entry>
<title>Core: Move CountPerformanceMarker to VideoInterface to eliminate a Throttle call. PerformanceMetrics: Fixes/Cleanups.</title>
<updated>2025-04-03T04:23:51+00:00</updated>
<author>
<name>Jordan Woyak</name>
<email>jordan.woyak@gmail.com</email>
</author>
<published>2025-03-08T01:26:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=c42dab6388de9318bed370900c3431d8231a5376'/>
<id>c42dab6388de9318bed370900c3431d8231a5376</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #13398 from jordan-woyak/perf-tracker</title>
<updated>2025-03-23T19:21:11+00:00</updated>
<author>
<name>JMC47</name>
<email>JMC4789@gmail.com</email>
</author>
<published>2025-03-23T19:21:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=28f1beeca84911481e7ad8f925bd5fd1f5b2563e'/>
<id>28f1beeca84911481e7ad8f925bd5fd1f5b2563e</id>
<content type='text'>
PerformanceTracker: Eliminate mutex. General cleanups.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PerformanceTracker: Eliminate mutex. General cleanups.</pre>
</div>
</content>
</entry>
<entry>
<title>PerformanceTracker: Pass chrono values instead of us s64.</title>
<updated>2025-03-15T19:40:00+00:00</updated>
<author>
<name>Jordan Woyak</name>
<email>jordan.woyak@gmail.com</email>
</author>
<published>2025-03-05T07:36:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b2ce3fbefc34fac9449e5f88f15c7a4da0825fac'/>
<id>b2ce3fbefc34fac9449e5f88f15c7a4da0825fac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
