| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 | 330 |
| 331 | 331 |
| 332 static void CFuncDoTrace() { | 332 static void CFuncDoTrace() { |
| 333 Address fp; | 333 Address fp; |
| 334 #ifdef __GNUC__ | 334 #ifdef __GNUC__ |
| 335 fp = reinterpret_cast<Address>(__builtin_frame_address(0)); | 335 fp = reinterpret_cast<Address>(__builtin_frame_address(0)); |
| 336 #elif defined _MSC_VER && defined V8_TARGET_ARCH_IA32 | 336 #elif defined _MSC_VER && defined V8_TARGET_ARCH_IA32 |
| 337 __asm mov [fp], ebp // NOLINT | 337 __asm mov [fp], ebp // NOLINT |
| 338 #elif defined _MSC_VER && defined V8_TARGET_ARCH_X64 | 338 #elif defined _MSC_VER && defined V8_TARGET_ARCH_X64 |
| 339 // FIXME: I haven't really tried to compile it. | 339 // TODO(X64): __asm extension is not supported by the Microsoft Visual C++ |
| 340 __asm movq [fp], rbp // NOLINT | 340 // 64-bit compiler. |
| 341 fp = 0; |
| 342 UNIMPLEMENTED(); |
| 341 #endif | 343 #endif |
| 342 DoTrace(fp); | 344 DoTrace(fp); |
| 343 } | 345 } |
| 344 | 346 |
| 345 | 347 |
| 346 static int CFunc(int depth) { | 348 static int CFunc(int depth) { |
| 347 if (depth <= 0) { | 349 if (depth <= 0) { |
| 348 CFuncDoTrace(); | 350 CFuncDoTrace(); |
| 349 return 0; | 351 return 0; |
| 350 } else { | 352 } else { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 367 CHECK_EQ(0, GetJsEntrySp()); | 369 CHECK_EQ(0, GetJsEntrySp()); |
| 368 CompileRun("a = 1; b = a + 1;"); | 370 CompileRun("a = 1; b = a + 1;"); |
| 369 CHECK_EQ(0, GetJsEntrySp()); | 371 CHECK_EQ(0, GetJsEntrySp()); |
| 370 CompileRun("js_entry_sp();"); | 372 CompileRun("js_entry_sp();"); |
| 371 CHECK_EQ(0, GetJsEntrySp()); | 373 CHECK_EQ(0, GetJsEntrySp()); |
| 372 CompileRun("js_entry_sp_level2();"); | 374 CompileRun("js_entry_sp_level2();"); |
| 373 CHECK_EQ(0, GetJsEntrySp()); | 375 CHECK_EQ(0, GetJsEntrySp()); |
| 374 } | 376 } |
| 375 | 377 |
| 376 #endif // ENABLE_LOGGING_AND_PROFILING | 378 #endif // ENABLE_LOGGING_AND_PROFILING |
| OLD | NEW |