Fixed a couple of places where stored pointer to the isolate can be used instead of reading from thread local storage.
BUG=None
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/
18418003
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15457
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
-void ProfilerEventsProcessor::AddCurrentStack() {
+void ProfilerEventsProcessor::AddCurrentStack(Isolate* isolate) {
TickSampleEventRecord record(enqueue_order_);
TickSample* sample = &record.sample;
- Isolate* isolate = Isolate::Current();
sample->state = isolate->current_vm_state();
sample->pc = reinterpret_cast<Address>(sample); // Not NULL.
for (StackTraceFrameIterator it(isolate);
if (profiles_->StartProfiling(title, next_profile_uid_++, record_samples)) {
StartProcessorIfNotStarted();
}
- processor_->AddCurrentStack();
+ processor_->AddCurrentStack(isolate_);
}
void Enqueue(const CodeEventsContainer& event);
// Puts current stack into tick sample events buffer.
- void AddCurrentStack();
+ void AddCurrentStack(Isolate* isolate);
// Tick sample events are filled directly in the buffer of the circular
// queue (because the structure is of fixed width, but usually not all
}
if (!FLAG_log_code || !log_->IsEnabled()) return;
- if (code == Isolate::Current()->builtins()->builtin(
+ if (code == isolate_->builtins()->builtin(
Builtins::kLazyCompile))
return;
// During iteration, there can be heap allocation due to
// GetScriptLineNumber call.
for (int i = 0; i < compiled_funcs_count; ++i) {
- if (*code_objects[i] == Isolate::Current()->builtins()->builtin(
+ if (*code_objects[i] == isolate_->builtins()->builtin(
Builtins::kLazyCompile))
continue;
LogExistingFunction(sfis[i], code_objects[i]);
code_event_handler_ = event_handler;
if (code_event_handler_ != NULL && (options & kJitCodeEventEnumExisting)) {
- HandleScope scope(Isolate::Current());
+ HandleScope scope(isolate_);
LogCodeObjects();
LogCompiledFunctions();
}