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

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

Issue 2711353003: Fixed tests not having MallocHooks initialized for tests in release mode. (Closed)
Patch Set: Created 3 years, 9 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/snapshot_test.cc ('k') | tests/language/disassemble_test.dart » ('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 #ifndef PRODUCT 4 #ifndef PRODUCT
5 #include "vm/source_report.h" 5 #include "vm/source_report.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/object_store.h" 10 #include "vm/object_store.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const Script* script, 49 const Script* script,
50 TokenPosition start_pos, 50 TokenPosition start_pos,
51 TokenPosition end_pos) { 51 TokenPosition end_pos) {
52 thread_ = thread; 52 thread_ = thread;
53 script_ = script; 53 script_ = script;
54 start_pos_ = start_pos; 54 start_pos_ = start_pos;
55 end_pos_ = end_pos; 55 end_pos_ = end_pos;
56 ClearScriptTable(); 56 ClearScriptTable();
57 if (IsReportRequested(kProfile)) { 57 if (IsReportRequested(kProfile)) {
58 // Build the profile. 58 // Build the profile.
59 SampleFilter samplesForIsolate(thread_->isolate(), Thread::kMutatorTask, -1, 59 SampleFilter samplesForIsolate(thread_->isolate()->main_port(),
60 -1); 60 Thread::kMutatorTask, -1, -1);
61 profile_.Build(thread, &samplesForIsolate, Profile::kNoTags); 61 profile_.Build(thread, &samplesForIsolate, Profile::kNoTags);
62 } 62 }
63 } 63 }
64 64
65 65
66 bool SourceReport::IsReportRequested(ReportKind report_kind) { 66 bool SourceReport::IsReportRequested(ReportKind report_kind) {
67 return (report_set_ & report_kind) != 0; 67 return (report_set_ & report_kind) != 0;
68 } 68 }
69 69
70 70
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 VisitClosures(&ranges); 527 VisitClosures(&ranges);
528 } 528 }
529 529
530 // Print the script table. 530 // Print the script table.
531 JSONArray scripts(&report, "scripts"); 531 JSONArray scripts(&report, "scripts");
532 PrintScriptTable(&scripts); 532 PrintScriptTable(&scripts);
533 } 533 }
534 534
535 } // namespace dart 535 } // namespace dart
536 #endif // PRODUCT 536 #endif // PRODUCT
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | tests/language/disassemble_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698