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

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

Issue 1820013002: Remember thread's task when sampling use it when filtering (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« runtime/vm/profiler_service.cc ('K') | « runtime/vm/profiler_test.cc ('k') | no next file » | 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 #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
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
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
OLDNEW
« runtime/vm/profiler_service.cc ('K') | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698