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

Unified Diff: runtime/vm/profiler.h

Issue 1423473004: Switch profiler from isolates to threads [second landing] (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index ff8e14853d20a9caff4f295efa730c498b5988c8..affe7100b46a74ad9cc6c82d4489947a83a06169 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -33,55 +33,21 @@ class Profiler : public AllStatic {
static void SetSampleDepth(intptr_t depth);
static void SetSamplePeriod(intptr_t period);
- static void InitProfilingForIsolate(Isolate* isolate,
- bool shared_buffer = true);
- static void ShutdownProfilingForIsolate(Isolate* isolate);
-
- static void BeginExecution(Isolate* isolate);
- static void EndExecution(Isolate* isolate);
-
static SampleBuffer* sample_buffer() {
return sample_buffer_;
}
- static void RecordAllocation(Thread* thread, intptr_t cid);
+ static void SampleAllocation(Thread* thread, intptr_t cid);
+ static void SampleThread(Thread* thread,
+ const InterruptedThreadState& state);
private:
static bool initialized_;
static Monitor* monitor_;
- static void RecordSampleInterruptCallback(const InterruptedThreadState& state,
- void* data);
-
static SampleBuffer* sample_buffer_;
-};
-
-
-class IsolateProfilerData {
- public:
- IsolateProfilerData(SampleBuffer* sample_buffer, bool own_sample_buffer);
- ~IsolateProfilerData();
-
- SampleBuffer* sample_buffer() const { return sample_buffer_; }
-
- void set_sample_buffer(SampleBuffer* sample_buffer) {
- sample_buffer_ = sample_buffer;
- }
-
- bool blocked() const {
- return block_count_ > 0;
- }
-
- void Block();
-
- void Unblock();
-
- private:
- SampleBuffer* sample_buffer_;
- bool own_sample_buffer_;
- intptr_t block_count_;
- DISALLOW_COPY_AND_ASSIGN(IsolateProfilerData);
+ friend class Thread;
};
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698