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

Unified Diff: runtime/vm/unit_test.h

Issue 137483010: Add more timing information in the VM to track time spent is dart code Vs native code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/timer_scope.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
===================================================================
--- runtime/vm/unit_test.h (revision 32801)
+++ runtime/vm/unit_test.h (working copy)
@@ -9,6 +9,7 @@
#include "vm/ast.h"
#include "vm/dart.h"
+#include "vm/dart_api_impl.h"
#include "vm/globals.h"
#include "vm/heap.h"
#include "vm/isolate.h"
@@ -54,6 +55,7 @@
#define ASSEMBLER_TEST_RUN(name, test) \
static void AssemblerTestRun##name(AssemblerTest* test); \
TEST_CASE(name) { \
+ NativeToVmTimerScope timer(Isolate::Current()); \
Assembler __assembler__; \
AssemblerTest test(""#name, &__assembler__); \
AssemblerTestGenerate##name(test.assembler()); \
@@ -77,6 +79,7 @@
#define CODEGEN_TEST_RUN(name, expected) \
static void CodeGenTestRun##name(const Function& function); \
TEST_CASE(name) { \
+ NativeToVmTimerScope timer(Isolate::Current()); \
CodeGenTest __test__(""#name); \
CodeGenTestGenerate##name(&__test__); \
__test__.Compile(); \
@@ -97,6 +100,7 @@
#define CODEGEN_TEST_RAW_RUN(name, function) \
static void CodeGenTestRun##name(const Function& function); \
TEST_CASE(name) { \
+ NativeToVmTimerScope timer(Isolate::Current()); \
CodeGenTest __test__(""#name); \
CodeGenTestGenerate##name(&__test__); \
__test__.Compile(); \
@@ -110,6 +114,7 @@
#define CODEGEN_TEST2_RUN(name1, name2, expected) \
static void CodeGenTestRun##name1(const Function& function); \
TEST_CASE(name1) { \
+ NativeToVmTimerScope timer(Isolate::Current()); \
/* Generate code for name2 */ \
CodeGenTest __test2__(""#name2); \
CodeGenTestGenerate##name2(&__test2__); \
« no previous file with comments | « runtime/vm/timer_scope.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698