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

Side by Side Diff: runtime/vm/timeline.h

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/thread_interrupter_win.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 VM_TIMELINE_H_ 5 #ifndef VM_TIMELINE_H_
6 #define VM_TIMELINE_H_ 6 #define VM_TIMELINE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/bitfield.h" 9 #include "vm/bitfield.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // NOTE: It is not allowed to call StartEvent again without completing 337 // NOTE: It is not allowed to call StartEvent again without completing
338 // the first event. 338 // the first event.
339 TimelineEvent* StartEvent(); 339 TimelineEvent* StartEvent();
340 340
341 private: 341 private:
342 const char* name_; 342 const char* name_;
343 bool enabled_; 343 bool enabled_;
344 const bool* globally_enabled_; 344 const bool* globally_enabled_;
345 }; 345 };
346 346
347 #ifndef PRODUCT
347 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \ 348 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \
348 TimelineDurationScope tds(thread, \ 349 TimelineDurationScope tds(thread, \
349 thread->isolate()->GetCompilerStream(), \ 350 thread->isolate()->GetCompilerStream(), \
350 "Compile" suffix); \ 351 "Compile" suffix); \
351 if (tds.enabled()) { \ 352 if (tds.enabled()) { \
352 tds.SetNumArguments(1); \ 353 tds.SetNumArguments(1); \
353 tds.CopyArgument( \ 354 tds.CopyArgument( \
354 0, \ 355 0, \
355 "function", \ 356 "function", \
356 function.ToLibNamePrefixedQualifiedCString()); \ 357 function.ToLibNamePrefixedQualifiedCString()); \
357 } 358 }
358 359 #else
360 #define TIMELINE_FUNCTION_COMPILATION_DURATION(thread, suffix, function) \
361 do { } while (false);
362 #endif // !PRODUCT
359 363
360 // See |TimelineDurationScope| and |TimelineBeginEndScope|. 364 // See |TimelineDurationScope| and |TimelineBeginEndScope|.
361 class TimelineEventScope : public StackResource { 365 class TimelineEventScope : public StackResource {
362 public: 366 public:
363 bool enabled() const { 367 bool enabled() const {
364 return enabled_; 368 return enabled_;
365 } 369 }
366 370
367 void SetNumArguments(intptr_t length); 371 void SetNumArguments(intptr_t length);
368 372
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 749
746 private: 750 private:
747 TimelineEventBlock* current_; 751 TimelineEventBlock* current_;
748 TimelineEventRecorder* recorder_; 752 TimelineEventRecorder* recorder_;
749 }; 753 };
750 754
751 755
752 } // namespace dart 756 } // namespace dart
753 757
754 #endif // VM_TIMELINE_H_ 758 #endif // VM_TIMELINE_H_
OLDNEW
« no previous file with comments | « runtime/vm/thread_interrupter_win.cc ('k') | runtime/vm/timeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698