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

Unified Diff: runtime/vm/profiler.cc

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments 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
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index d1d52b887ddfbbaeaf5122a46963658a489df7b8..cc6e6b8fc044cc983ccec44b0b1cf6df4c5639b5 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -747,17 +747,19 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
uword* stack_lower,
uword* stack_upper) {
ASSERT(thread != NULL);
- Isolate* isolate = thread->isolate();
- ASSERT(isolate != NULL);
+ OSThread* os_thread = thread->os_thread();
+ ASSERT(os_thread != NULL);
ASSERT(stack_lower != NULL);
ASSERT(stack_upper != NULL);
#if defined(USING_SIMULATOR)
const bool in_dart_code = thread->IsExecutingDartCode();
if (in_dart_code) {
+ Isolate* isolate = thread->isolate();
+ ASSERT(isolate != NULL);
Simulator* simulator = isolate->simulator();
*stack_lower = simulator->StackBase();
*stack_upper = simulator->StackTop();
- } else if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper)) {
+ } else if (!os_thread->GetProfilerStackBounds(stack_lower, stack_upper)) {
// Could not get stack boundary.
return false;
}
@@ -765,7 +767,7 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
return false;
}
#else
- if (!isolate->GetProfilerStackBounds(stack_lower, stack_upper) ||
+ if (!os_thread->GetProfilerStackBounds(stack_lower, stack_upper) ||
(*stack_lower == 0) || (*stack_upper == 0)) {
// Could not get stack boundary.
return false;
@@ -782,12 +784,12 @@ static bool GetAndValidateIsolateStackBounds(Thread* thread,
}
if ((sp < *stack_lower) || (sp >= *stack_upper)) {
- // Stack pointer is outside isolate stack boundary.
+ // Stack pointer is outside thread's stack boundary.
return false;
}
if ((fp < *stack_lower) || (fp >= *stack_upper)) {
- // Frame pointer is outside isolate stack boundary.
+ // Frame pointer is outside threads's stack boundary.
return false;
}

Powered by Google App Engine
This is Rietveld 408576698