X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Futil.cpp;h=c178d90a99905b029748e691f0655d6fa83c2b3b;hb=refs%2Ftags%2F5.0.0;hp=db61bc28e4a88fcb720ee859776e59e21cf11cd8;hpb=2b546956a800545bdda2be9682fac21fd1e86736;p=staging%2Fwindowmanager.git diff --git a/src/util.cpp b/src/util.cpp index db61bc2..c178d90 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -24,7 +24,13 @@ #include +#ifdef SCOPE_TRACING thread_local int ScopeTrace::indent = 0; +ScopeTrace::ScopeTrace(char const *func) : f(func) { + fprintf(stderr, "%lu %*s%s -->\n", pthread_self(), 2 * indent++, "", this->f); +} +ScopeTrace::~ScopeTrace() { fprintf(stderr, "%lu %*s%s <--\n", pthread_self(), 2 * --indent, "", this->f); } +#endif unique_fd::~unique_fd() { if (this->fd != -1) {