| 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 |
| 6 |
| 5 #include <stdlib.h> | 7 #include <stdlib.h> |
| 6 | 8 |
| 7 #include "v8.h" | 9 #include "v8.h" |
| 8 | 10 |
| 9 #include "log.h" | 11 #include "log.h" |
| 10 #include "cctest.h" | 12 #include "cctest.h" |
| 11 | 13 |
| 12 using v8::Function; | 14 using v8::Function; |
| 13 using v8::Local; | 15 using v8::Local; |
| 14 using v8::Object; | 16 using v8::Object; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 "JSTrace();"); | 219 "JSTrace();"); |
| 218 Handle<JSFunction> js_trace(JSFunction::cast(*(v8::Utils::OpenHandle( | 220 Handle<JSFunction> js_trace(JSFunction::cast(*(v8::Utils::OpenHandle( |
| 219 *GetGlobalProperty("JSTrace"))))); | 221 *GetGlobalProperty("JSTrace"))))); |
| 220 v8::internal::Code* js_trace_code = js_trace->code(); | 222 v8::internal::Code* js_trace_code = js_trace->code(); |
| 221 CheckRetAddrIsInFunction( | 223 CheckRetAddrIsInFunction( |
| 222 reinterpret_cast<unsigned int>(sample.stack[0]), | 224 reinterpret_cast<unsigned int>(sample.stack[0]), |
| 223 reinterpret_cast<unsigned int>(js_trace_code->instruction_start()), | 225 reinterpret_cast<unsigned int>(js_trace_code->instruction_start()), |
| 224 js_trace_code->instruction_size()); | 226 js_trace_code->instruction_size()); |
| 225 CHECK_EQ(0, sample.stack[1]); | 227 CHECK_EQ(0, sample.stack[1]); |
| 226 } | 228 } |
| 229 |
| 230 #endif // ENABLE_LOGGING_AND_PROFILING |
| OLD | NEW |