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

Unified Diff: runtime/vm/profiler.cc

Issue 205713004: Add isolate tag-profile and better handling of errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 68de13cd6092918ffa9f19592f0eade8e9a72a2f..24d3da973f44574fe46971f0885cf3350147fb1e 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -962,30 +962,6 @@ class CodeRegionTableBuilder : public SampleVisitor {
region->set_creation_serial(visited());
}
- void TickTag(uword tag, bool exclusive) {
- CodeRegionTable::TickResult r;
- intptr_t serial = exclusive ? -1 : visited();
- r = tag_code_table_->Tick(tag, exclusive, serial, 0);
- if (r == CodeRegionTable::kTicked) {
- // Live code found and ticked.
- return;
- }
- ASSERT(r == CodeRegionTable::kNotFound);
- CreateAndTickTagCodeRegion(tag, exclusive, serial);
- }
-
- void CreateAndTickTagCodeRegion(uword tag, bool exclusive, intptr_t serial) {
- // Need to create tag code.
- CodeRegion* region = new CodeRegion(CodeRegion::kTagCode,
- tag,
- tag + 1,
- 0);
- intptr_t index = tag_code_table_->InsertCodeRegion(region);
- region->set_creation_serial(visited());
- ASSERT(index >= 0);
- tag_code_table_->At(index)->Tick(tag, exclusive, serial);
- }
-
void Tick(uword pc, bool exclusive, int64_t timestamp) {
CodeRegionTable::TickResult r;
intptr_t serial = exclusive ? -1 : visited();
@@ -1553,6 +1529,7 @@ class ProfilerSampleStackWalker : public ValueObject {
uword lower_bound_;
};
+
void Profiler::RecordSampleInterruptCallback(
const InterruptedThreadState& state,
void* data) {
@@ -1560,6 +1537,9 @@ void Profiler::RecordSampleInterruptCallback(
if (isolate == NULL) {
return;
}
+ VMTagCounters* counters = isolate->vm_tag_counters();
+ ASSERT(counters != NULL);
+ counters->Increment(isolate->vm_tag());
IsolateProfilerData* profiler_data = isolate->profiler_data();
if (profiler_data == NULL) {
return;
@@ -1582,5 +1562,4 @@ void Profiler::RecordSampleInterruptCallback(
stackWalker.walk(isolate->heap(), isolate->vm_tag());
}
-
} // namespace dart
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698