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

Side by Side Diff: test/cctest/test-log-stack-tracer.cc

Issue 552089: A follow-up to fix 553: really report function object moves. (Closed)
Patch Set: Add an assertion to test Created 10 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 v8::HandleScope scope; 308 v8::HandleScope scope;
309 CreateTraceCallerFunction("JSFuncDoTrace", "js_trace"); 309 CreateTraceCallerFunction("JSFuncDoTrace", "js_trace");
310 CompileRun( 310 CompileRun(
311 "function JSTrace() {" 311 "function JSTrace() {"
312 " JSFuncDoTrace();" 312 " JSFuncDoTrace();"
313 "};\n" 313 "};\n"
314 "function OuterJSTrace() {" 314 "function OuterJSTrace() {"
315 " JSTrace();" 315 " JSTrace();"
316 "};\n" 316 "};\n"
317 "OuterJSTrace();"); 317 "OuterJSTrace();");
318 // The last JS function called.
319 CHECK_EQ(GetGlobalJSFunction("JSFuncDoTrace")->address(),
320 sample.function);
318 CHECK_GT(sample.frames_count, 1); 321 CHECK_GT(sample.frames_count, 1);
319 // Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace" 322 // Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace"
320 CheckRetAddrIsInJSFunction("JSTrace", 323 CheckRetAddrIsInJSFunction("JSTrace",
321 sample.stack[0]); 324 sample.stack[0]);
322 CheckRetAddrIsInJSFunction("OuterJSTrace", 325 CheckRetAddrIsInJSFunction("OuterJSTrace",
323 sample.stack[1]); 326 sample.stack[1]);
324 } 327 }
325 328
326 329
327 static void CFuncDoTrace(byte dummy_parameter) { 330 static void CFuncDoTrace(byte dummy_parameter) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 CHECK_EQ(0, GetJsEntrySp()); 366 CHECK_EQ(0, GetJsEntrySp());
364 CompileRun("a = 1; b = a + 1;"); 367 CompileRun("a = 1; b = a + 1;");
365 CHECK_EQ(0, GetJsEntrySp()); 368 CHECK_EQ(0, GetJsEntrySp());
366 CompileRun("js_entry_sp();"); 369 CompileRun("js_entry_sp();");
367 CHECK_EQ(0, GetJsEntrySp()); 370 CHECK_EQ(0, GetJsEntrySp());
368 CompileRun("js_entry_sp_level2();"); 371 CompileRun("js_entry_sp_level2();");
369 CHECK_EQ(0, GetJsEntrySp()); 372 CHECK_EQ(0, GetJsEntrySp());
370 } 373 }
371 374
372 #endif // ENABLE_LOGGING_AND_PROFILING 375 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698