OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // Compile the script. | 273 // Compile the script. |
274 CompileRun(trace_call_buf.start()); | 274 CompileRun(trace_call_buf.start()); |
275 } | 275 } |
276 | 276 |
277 | 277 |
278 // This test verifies that stack tracing works when called during | 278 // This test verifies that stack tracing works when called during |
279 // execution of a native function called from JS code. In this case, | 279 // execution of a native function called from JS code. In this case, |
280 // StackTracer uses Isolate::c_entry_fp as a starting point for stack | 280 // StackTracer uses Isolate::c_entry_fp as a starting point for stack |
281 // walking. | 281 // walking. |
282 TEST(CFromJSStackTrace) { | 282 TEST(CFromJSStackTrace) { |
| 283 // BUG(1303) Inlining of JSFuncDoTrace() in JSTrace below breaks this test. |
| 284 i::FLAG_use_inlining = false; |
| 285 |
283 TickSample sample; | 286 TickSample sample; |
284 InitTraceEnv(&sample); | 287 InitTraceEnv(&sample); |
285 | 288 |
286 InitializeVM(); | 289 InitializeVM(); |
287 v8::HandleScope scope; | 290 v8::HandleScope scope; |
288 // Create global function JSFuncDoTrace which calls | 291 // Create global function JSFuncDoTrace which calls |
289 // extension function trace() with the current frame pointer value. | 292 // extension function trace() with the current frame pointer value. |
290 CreateTraceCallerFunction("JSFuncDoTrace", "trace"); | 293 CreateTraceCallerFunction("JSFuncDoTrace", "trace"); |
291 Local<Value> result = CompileRun( | 294 Local<Value> result = CompileRun( |
292 "function JSTrace() {" | 295 "function JSTrace() {" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 CHECK_EQ(0, GetJsEntrySp()); | 409 CHECK_EQ(0, GetJsEntrySp()); |
407 CompileRun("a = 1; b = a + 1;"); | 410 CompileRun("a = 1; b = a + 1;"); |
408 CHECK_EQ(0, GetJsEntrySp()); | 411 CHECK_EQ(0, GetJsEntrySp()); |
409 CompileRun("js_entry_sp();"); | 412 CompileRun("js_entry_sp();"); |
410 CHECK_EQ(0, GetJsEntrySp()); | 413 CHECK_EQ(0, GetJsEntrySp()); |
411 CompileRun("js_entry_sp_level2();"); | 414 CompileRun("js_entry_sp_level2();"); |
412 CHECK_EQ(0, GetJsEntrySp()); | 415 CHECK_EQ(0, GetJsEntrySp()); |
413 } | 416 } |
414 | 417 |
415 #endif // ENABLE_LOGGING_AND_PROFILING | 418 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |