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

Unified Diff: runtime/vm/profiler.h

Issue 201213004: Use VM tag in profile and add stack trace trie (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
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 9fb098a66b4f29dc5dce76ba2277837c5da78181..81dccd0cfb5a8de43a37e662b2a3fc1aa2638313 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -8,6 +8,7 @@
#include "vm/allocation.h"
#include "vm/code_observers.h"
#include "vm/globals.h"
+#include "vm/tags.h"
#include "vm/thread.h"
#include "vm/thread_interrupter.h"
@@ -37,7 +38,7 @@ class Profiler : public AllStatic {
static void EndExecution(Isolate* isolate);
static void PrintToJSONStream(Isolate* isolate, JSONStream* stream,
- bool full);
+ bool full, bool use_tags);
static void WriteProfile(Isolate* isolate);
static SampleBuffer* sample_buffer() {
@@ -109,6 +110,7 @@ class Sample {
timestamp_ = timestamp;
tid_ = tid;
isolate_ = isolate;
+ vm_tag_ = VMTag::kInvalidTagId;
for (intptr_t i = 0; i < kSampleFramesSize; i++) {
pcs_[i] = 0;
}
@@ -138,10 +140,19 @@ class Sample {
pcs_[i] = pc;
}
+ uword vm_tag() const {
+ return vm_tag_;
+ }
+ void set_vm_tag(uword tag) {
+ ASSERT(tag != VMTag::kInvalidTagId);
+ vm_tag_ = tag;
+ }
+
private:
int64_t timestamp_;
ThreadId tid_;
Isolate* isolate_;
+ uword vm_tag_;
uword pcs_[kSampleFramesSize];
};

Powered by Google App Engine
This is Rietveld 408576698