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

Side by Side Diff: runtime/vm/timeline_analysis.cc

Issue 3004563003: Refactor Isolate name format, storage and log (Closed)
Patch Set: Created 3 years, 4 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
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 #include "vm/timeline_analysis.h" 5 #include "vm/timeline_analysis.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/log.h" 9 #include "vm/log.h"
10 #include "vm/os_thread.h" 10 #include "vm/os_thread.h"
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 ASSERT(thread != NULL); 499 ASSERT(thread != NULL);
500 Isolate* isolate = thread->isolate(); 500 Isolate* isolate = thread->isolate();
501 ASSERT(isolate != NULL); 501 ASSERT(isolate != NULL);
502 Zone* zone = thread->zone(); 502 Zone* zone = thread->zone();
503 ASSERT(zone != NULL); 503 ASSERT(zone != NULL);
504 TimelineEventRecorder* recorder = Timeline::recorder(); 504 TimelineEventRecorder* recorder = Timeline::recorder();
505 ASSERT(recorder != NULL); 505 ASSERT(recorder != NULL);
506 TimelinePauses pauses(zone, isolate, recorder); 506 TimelinePauses pauses(zone, isolate, recorder);
507 pauses.Setup(); 507 pauses.Setup();
508 508
509 THR_Print("Timing for isolate %s (from %" Pd " threads)\n", isolate->name(), 509 THR_Print("Timing for isolate (%" Pd64 ") '%s' (from %" Pd " threads)\n",
510 static_cast<int64_t>(isolate->main_port()), isolate->name(),
510 pauses.NumThreads()); 511 pauses.NumThreads());
511 THR_Print("\n"); 512 THR_Print("\n");
512 for (intptr_t t_idx = 0; t_idx < pauses.NumThreads(); t_idx++) { 513 for (intptr_t t_idx = 0; t_idx < pauses.NumThreads(); t_idx++) {
513 TimelineAnalysisThread* tat = pauses.At(t_idx); 514 TimelineAnalysisThread* tat = pauses.At(t_idx);
514 ASSERT(tat != NULL); 515 ASSERT(tat != NULL);
515 pauses.CalculatePauseTimesForThread(tat->id()); 516 pauses.CalculatePauseTimesForThread(tat->id());
516 THR_Print("Thread %" Pd " (%" Px "):\n", t_idx, 517 THR_Print("Thread %" Pd " (%" Px "):\n", t_idx,
517 OSThread::ThreadIdToIntPtr(tat->id())); 518 OSThread::ThreadIdToIntPtr(tat->id()));
518 for (intptr_t j = 0; j < pauses.NumPauseInfos(); j++) { 519 for (intptr_t j = 0; j < pauses.NumPauseInfos(); j++) {
519 const TimelineLabelPauseInfo* pause_info = pauses.PauseInfoAt(j); 520 const TimelineLabelPauseInfo* pause_info = pauses.PauseInfoAt(j);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 MicrosecondsToMilliseconds(pause_info->exclusive_micros())); 568 MicrosecondsToMilliseconds(pause_info->exclusive_micros()));
568 THR_Print("%.3f ms max on stack; ", 569 THR_Print("%.3f ms max on stack; ",
569 MicrosecondsToMilliseconds(pause_info->max_inclusive_micros())); 570 MicrosecondsToMilliseconds(pause_info->max_inclusive_micros()));
570 THR_Print("%.3f ms max executing.\n", 571 THR_Print("%.3f ms max executing.\n",
571 MicrosecondsToMilliseconds(pause_info->max_exclusive_micros())); 572 MicrosecondsToMilliseconds(pause_info->max_exclusive_micros()));
572 } 573 }
573 574
574 #endif // !PRODUCT 575 #endif // !PRODUCT
575 576
576 } // namespace dart 577 } // namespace dart
OLDNEW
« runtime/observatory/tests/service/set_name_rpc_test.dart ('K') | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698