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

Unified Diff: src/heap.cc

Issue 6895014: Avoid hidden TLS access in CpuProfiler::is_profiling(). (Closed)
Patch Set: Created 9 years, 8 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 | « src/cpu-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 518f4ab4d354848244dba977d28088013d20539e..b1b510974090c14afb79a1908493bdc5e19d75b8 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -1347,7 +1347,7 @@ class ScavengingVisitor : public StaticVisitorBase {
#if defined(ENABLE_LOGGING_AND_PROFILING)
Isolate* isolate = heap->isolate();
if (isolate->logger()->is_logging() ||
- isolate->cpu_profiler()->is_profiling()) {
+ CpuProfiler::is_profiling(isolate)) {
if (target->IsSharedFunctionInfo()) {
PROFILE(isolate, SharedFunctionInfoMoveEvent(
source->address(), target->address()));
@@ -1522,8 +1522,8 @@ void Heap::SwitchScavengingVisitorsTableIfProfilingWasEnabled() {
return;
}
- if (isolate()->logger()->is_logging() ||
- isolate()->cpu_profiler()->is_profiling() ||
+ if (isolate()->logger()->is_logging() |
+ CpuProfiler::is_profiling(isolate()) ||
(isolate()->heap_profiler() != NULL &&
isolate()->heap_profiler()->is_profiling())) {
// If one of the isolates is doing scavenge at this moment of time
« no previous file with comments | « src/cpu-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698