| OLD | NEW |
| 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/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 25 matching lines...) Expand all Loading... |
| 36 TokenPosition end_pos) { | 36 TokenPosition end_pos) { |
| 37 thread_ = thread; | 37 thread_ = thread; |
| 38 script_ = script; | 38 script_ = script; |
| 39 start_pos_ = start_pos; | 39 start_pos_ = start_pos; |
| 40 end_pos_ = end_pos; | 40 end_pos_ = end_pos; |
| 41 script_table_entries_.Clear(); | 41 script_table_entries_.Clear(); |
| 42 script_table_.Clear(); | 42 script_table_.Clear(); |
| 43 next_script_index_ = 0; | 43 next_script_index_ = 0; |
| 44 if (IsReportRequested(kProfile)) { | 44 if (IsReportRequested(kProfile)) { |
| 45 // Build the profile. | 45 // Build the profile. |
| 46 SampleFilter samplesForIsolate(thread_->isolate(), -1, -1); | 46 SampleFilter samplesForIsolate(thread_->isolate(), |
| 47 Thread::kMutatorTask, |
| 48 -1, -1); |
| 47 profile_.Build(thread, &samplesForIsolate, Profile::kNoTags); | 49 profile_.Build(thread, &samplesForIsolate, Profile::kNoTags); |
| 48 } | 50 } |
| 49 } | 51 } |
| 50 | 52 |
| 51 | 53 |
| 52 bool SourceReport::IsReportRequested(ReportKind report_kind) { | 54 bool SourceReport::IsReportRequested(ReportKind report_kind) { |
| 53 return (report_set_ & report_kind) != 0; | 55 return (report_set_ & report_kind) != 0; |
| 54 } | 56 } |
| 55 | 57 |
| 56 | 58 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 VisitClosures(&ranges); | 446 VisitClosures(&ranges); |
| 445 } | 447 } |
| 446 | 448 |
| 447 // Print the script table. | 449 // Print the script table. |
| 448 JSONArray scripts(&report, "scripts"); | 450 JSONArray scripts(&report, "scripts"); |
| 449 PrintScriptTable(&scripts); | 451 PrintScriptTable(&scripts); |
| 450 } | 452 } |
| 451 | 453 |
| 452 | 454 |
| 453 } // namespace dart | 455 } // namespace dart |
| OLD | NEW |