[FancyZones] Trace various function calls (#10183)

* Implement CallTracer

* Add CallTracer to various places

* Newline

* Fix unit tests not compiling for some reason

* Add macro
remove some trace calls

* Add indentation

* Add semicolon

* Update src/modules/fancyzones/lib/CallTracer.cpp

Co-authored-by: Enrico Giordani <enricogior@users.noreply.github.com>

* Actually indent/unindent output

* Fix initial indent level

Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
Co-authored-by: Enrico Giordani <enricogior@users.noreply.github.com>
This commit is contained in:
Ivan Stošić
2021-03-15 13:58:25 +01:00
committed by GitHub
parent 9a061d74b3
commit 7377ef5606
10 changed files with 123 additions and 17 deletions

View File

@@ -10,6 +10,7 @@
#include "util.h"
#include "on_thread_executor.h"
#include "Settings.h"
#include "CallTracer.h"
#include <ShellScalingApi.h>
#include <mutex>
@@ -41,6 +42,7 @@ namespace
HWND ExtractWindow()
{
_TRACER_;
std::unique_lock lock(m_mutex);
if (m_pool.empty())
@@ -80,6 +82,7 @@ namespace
void FreeZoneWindow(HWND window)
{
_TRACER_;
Logger::info("Freeing zone window, hWnd = {}", (void*)window);
SetWindowLongPtrW(window, GWLP_USERDATA, 0);
ShowWindow(window, SW_HIDE);