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

Side by Side Diff: runtime/bin/utils.h

Issue 297183003: Reduce CPU usage when no isolates need to be profiled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_UTILS_H_ 5 #ifndef BIN_UTILS_H_
6 #define BIN_UTILS_H_ 6 #define BIN_UTILS_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 static void FreeUnicodeArgv(wchar_t** argv); 82 static void FreeUnicodeArgv(wchar_t** argv);
83 }; 83 };
84 84
85 class TimerUtils { 85 class TimerUtils {
86 public: 86 public:
87 static int64_t GetCurrentTimeMicros(); 87 static int64_t GetCurrentTimeMicros();
88 static int64_t GetCurrentTimeMilliseconds(); 88 static int64_t GetCurrentTimeMilliseconds();
89 static void Sleep(int64_t millis); 89 static void Sleep(int64_t millis);
90 }; 90 };
91 91
92 class ProfilerBlocker {
Anders Johnsen 2014/05/25 18:36:34 Stuff like this usually go into dartutils.h.
Cutch 2014/05/26 06:59:35 Done and renamed to ScopedBlockingCall
93 public:
94 ProfilerBlocker() {
95 Dart_BlockProfiler();
96 }
97
98 ~ProfilerBlocker() {
99 Dart_UnblockProfiler();
100 }
101 };
102
92 } // namespace bin 103 } // namespace bin
93 } // namespace dart 104 } // namespace dart
94 105
95 #endif // BIN_UTILS_H_ 106 #endif // BIN_UTILS_H_
OLDNEW
« no previous file with comments | « runtime/bin/stdio.cc ('k') | runtime/include/dart_api.h » ('j') | runtime/include/dart_api.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698