Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: tools/traceline/traceline/logging.h

Issue 20494: Import Traceline, a Windows performance trace event logger. (Closed)
Patch Set: Feedback. Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/traceline/traceline/dump_syscalls_idarub.rb ('k') | tools/traceline/traceline/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/traceline/traceline/logging.h
diff --git a/tools/traceline/traceline/logging.h b/tools/traceline/traceline/logging.h
new file mode 100755
index 0000000000000000000000000000000000000000..bf2e4fa068407cf0703bda72ec34ab3ccf680046
--- /dev/null
+++ b/tools/traceline/traceline/logging.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TRACELINE_LOGGING_H_
+#define TRACELINE_LOGGING_H_
+
+#include <windows.h>
+#include <stdio.h>
+
+#define CHECK(exp, ...) \
+ if (!(exp)) { \
+ printf("FAILED CHECK: %s\n %s:%d\n", #exp, __FILE__, __LINE__); \
+ printf("\naborted.\n"); \
+ if (::IsDebuggerPresent()) __debugbreak(); \
+ exit(1); \
+ }
+
+#define NOTREACHED(...) \
+ if (1) { \
+ printf("NOTREACHED:\n %s:%d\n", __FILE__, __LINE__); \
+ printf(__VA_ARGS__); \
+ printf("\naborted.\n"); \
+ if (::IsDebuggerPresent()) __debugbreak(); \
+ exit(1); \
+ }
+
+#endif // TRACELINE_LOGGING_H_
« no previous file with comments | « tools/traceline/traceline/dump_syscalls_idarub.rb ('k') | tools/traceline/traceline/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698