| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Tests of profiler-related functions from log.h | 3 // Tests of profiler-related functions from log.h |
| 4 | 4 |
| 5 #ifdef ENABLE_LOGGING_AND_PROFILING | 5 #ifdef ENABLE_LOGGING_AND_PROFILING |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "v8.h" | 9 #include "v8.h" |
| 10 | 10 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 v8::Handle<v8::Value> TraceExtension::JSTrace(const v8::Arguments& args) { | 126 v8::Handle<v8::Value> TraceExtension::JSTrace(const v8::Arguments& args) { |
| 127 DoTraceHideCEntryFPAddress(GetFP(args)); | 127 DoTraceHideCEntryFPAddress(GetFP(args)); |
| 128 return v8::Undefined(); | 128 return v8::Undefined(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 static Address GetJsEntrySp() { | 132 static Address GetJsEntrySp() { |
| 133 CHECK_NE(NULL, Top::GetCurrentThread()); | 133 CHECK_NE(NULL, i::Isolate::Current()->thread_local_top()); |
| 134 return Top::js_entry_sp(Top::GetCurrentThread()); | 134 return Top::js_entry_sp(i::Isolate::Current()->thread_local_top()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 v8::Handle<v8::Value> TraceExtension::JSEntrySP(const v8::Arguments& args) { | 138 v8::Handle<v8::Value> TraceExtension::JSEntrySP(const v8::Arguments& args) { |
| 139 CHECK_NE(0, GetJsEntrySp()); | 139 CHECK_NE(0, GetJsEntrySp()); |
| 140 return v8::Undefined(); | 140 return v8::Undefined(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 | 143 |
| 144 v8::Handle<v8::Value> TraceExtension::JSEntrySPLevel2( | 144 v8::Handle<v8::Value> TraceExtension::JSEntrySPLevel2( |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 CHECK_EQ(0, GetJsEntrySp()); | 398 CHECK_EQ(0, GetJsEntrySp()); |
| 399 CompileRun("a = 1; b = a + 1;"); | 399 CompileRun("a = 1; b = a + 1;"); |
| 400 CHECK_EQ(0, GetJsEntrySp()); | 400 CHECK_EQ(0, GetJsEntrySp()); |
| 401 CompileRun("js_entry_sp();"); | 401 CompileRun("js_entry_sp();"); |
| 402 CHECK_EQ(0, GetJsEntrySp()); | 402 CHECK_EQ(0, GetJsEntrySp()); |
| 403 CompileRun("js_entry_sp_level2();"); | 403 CompileRun("js_entry_sp_level2();"); |
| 404 CHECK_EQ(0, GetJsEntrySp()); | 404 CHECK_EQ(0, GetJsEntrySp()); |
| 405 } | 405 } |
| 406 | 406 |
| 407 #endif // ENABLE_LOGGING_AND_PROFILING | 407 #endif // ENABLE_LOGGING_AND_PROFILING |
| OLD | NEW |