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

Unified Diff: src/log.cc

Issue 7003108: "Deiceolate" Thread classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 298ef6eea70e3c2533ff928833602cfa6fa0f124..f9c3b8830babd31a06ff9eefe67c276d18e34d4a 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -122,6 +122,7 @@ class Profiler: public Thread {
// Returns the next index in the cyclic buffer.
int Succ(int index) { return (index + 1) % kBufferSize; }
+ Isolate* isolate_;
// Cyclic buffer for communicating profiling samples
// between the signal handler and the worker thread.
static const int kBufferSize = 128;
@@ -271,7 +272,8 @@ void SlidingStateWindow::AddState(StateTag state) {
// Profiler implementation.
//
Profiler::Profiler(Isolate* isolate)
- : Thread(isolate, "v8:Profiler"),
+ : Thread("v8:Profiler"),
+ isolate_(isolate),
head_(0),
tail_(0),
overflow_(false),
@@ -326,9 +328,8 @@ void Profiler::Disengage() {
void Profiler::Run() {
TickSample sample;
bool overflow = Remove(&sample);
- i::Isolate* isolate = ISOLATE;
while (running_) {
- LOG(isolate, TickEvent(&sample, overflow));
+ LOG(isolate_, TickEvent(&sample, overflow));
overflow = Remove(&sample);
}
}
@@ -1842,9 +1843,9 @@ bool Logger::Setup() {
if (FLAG_ll_prof) LogCodeInfo();
- ticker_ = new Ticker(Isolate::Current(), kSamplingIntervalMs);
-
Isolate* isolate = Isolate::Current();
+ ticker_ = new Ticker(isolate, kSamplingIntervalMs);
+
if (FLAG_sliding_state_window && sliding_state_window_ == NULL) {
sliding_state_window_ = new SlidingStateWindow(isolate);
}

Powered by Google App Engine
This is Rietveld 408576698