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

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

Issue 2966593002: Updated native memory allocation profiling to use its own sample buffer instead of sharing a sample… (Closed)
Patch Set: Updated native memory allocation profiling to use its own sample buffer instead of sharing a sample… Created 3 years, 5 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/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 #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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->main_port(), 59 SampleFilter samplesForIsolate(thread_->isolate()->main_port(),
60 Thread::kMutatorTask, -1, -1); 60 Thread::kMutatorTask, -1, -1);
61 profile_.Build(thread, &samplesForIsolate, Profile::kNoTags); 61 profile_.Build(thread, &samplesForIsolate, Profiler::sample_buffer(),
62 Profile::kNoTags);
62 } 63 }
63 } 64 }
64 65
65 66
66 bool SourceReport::IsReportRequested(ReportKind report_kind) { 67 bool SourceReport::IsReportRequested(ReportKind report_kind) {
67 return (report_set_ & report_kind) != 0; 68 return (report_set_ & report_kind) != 0;
68 } 69 }
69 70
70 71
71 bool SourceReport::ShouldSkipFunction(const Function& func) { 72 bool SourceReport::ShouldSkipFunction(const Function& func) {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 VisitClosures(&ranges); 527 VisitClosures(&ranges);
527 } 528 }
528 529
529 // Print the script table. 530 // Print the script table.
530 JSONArray scripts(&report, "scripts"); 531 JSONArray scripts(&report, "scripts");
531 PrintScriptTable(&scripts); 532 PrintScriptTable(&scripts);
532 } 533 }
533 534
534 } // namespace dart 535 } // namespace dart
535 #endif // PRODUCT 536 #endif // PRODUCT
OLDNEW
« no previous file with comments | « runtime/vm/profiler_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698