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

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

Issue 13873009: Remove code that analyzes tos values from tickprocessor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 "true;"); 280 "true;");
281 CHECK(!result.IsEmpty()); 281 CHECK(!result.IsEmpty());
282 // When stack tracer is invoked, the stack should look as follows: 282 // When stack tracer is invoked, the stack should look as follows:
283 // script [JS] 283 // script [JS]
284 // JSTrace() [JS] 284 // JSTrace() [JS]
285 // JSFuncDoTrace() [JS] [captures EBP value and encodes it as Smi] 285 // JSFuncDoTrace() [JS] [captures EBP value and encodes it as Smi]
286 // trace(EBP) [native (extension)] 286 // trace(EBP) [native (extension)]
287 // DoTrace(EBP) [native] 287 // DoTrace(EBP) [native]
288 // StackTracer::Trace 288 // StackTracer::Trace
289 289
290 CHECK(sample.has_external_callback); 290 CHECK(sample.external_callback);
291 CHECK_EQ(FUNCTION_ADDR(TraceExtension::Trace), sample.external_callback); 291 CHECK_EQ(FUNCTION_ADDR(TraceExtension::Trace), sample.external_callback);
292 292
293 // Stack tracing will start from the first JS function, i.e. "JSFuncDoTrace" 293 // Stack tracing will start from the first JS function, i.e. "JSFuncDoTrace"
294 int base = 0; 294 int base = 0;
295 CHECK_GT(sample.frames_count, base + 1); 295 CHECK_GT(sample.frames_count, base + 1);
296 296
297 CHECK(IsAddressWithinFuncCode("JSFuncDoTrace", sample.stack[base + 0])); 297 CHECK(IsAddressWithinFuncCode("JSFuncDoTrace", sample.stack[base + 0]));
298 CHECK(IsAddressWithinFuncCode("JSTrace", sample.stack[base + 1])); 298 CHECK(IsAddressWithinFuncCode("JSTrace", sample.stack[base + 1]));
299 } 299 }
300 300
(...skipping 29 matching lines...) Expand all
330 // When stack tracer is invoked, the stack should look as follows: 330 // When stack tracer is invoked, the stack should look as follows:
331 // script [JS] 331 // script [JS]
332 // OuterJSTrace() [JS] 332 // OuterJSTrace() [JS]
333 // JSTrace() [JS] 333 // JSTrace() [JS]
334 // JSFuncDoTrace() [JS] 334 // JSFuncDoTrace() [JS]
335 // js_trace(EBP) [native (extension)] 335 // js_trace(EBP) [native (extension)]
336 // DoTraceHideCEntryFPAddress(EBP) [native] 336 // DoTraceHideCEntryFPAddress(EBP) [native]
337 // StackTracer::Trace 337 // StackTracer::Trace
338 // 338 //
339 339
340 CHECK(sample.has_external_callback); 340 CHECK(sample.external_callback);
341 CHECK_EQ(FUNCTION_ADDR(TraceExtension::JSTrace), sample.external_callback); 341 CHECK_EQ(FUNCTION_ADDR(TraceExtension::JSTrace), sample.external_callback);
342 342
343 // Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace" 343 // Stack sampling will start from the caller of JSFuncDoTrace, i.e. "JSTrace"
344 int base = 0; 344 int base = 0;
345 CHECK_GT(sample.frames_count, base + 1); 345 CHECK_GT(sample.frames_count, base + 1);
346 CHECK(IsAddressWithinFuncCode("JSTrace", sample.stack[base + 0])); 346 CHECK(IsAddressWithinFuncCode("JSTrace", sample.stack[base + 0]));
347 CHECK(IsAddressWithinFuncCode("OuterJSTrace", sample.stack[base + 1])); 347 CHECK(IsAddressWithinFuncCode("OuterJSTrace", sample.stack[base + 1]));
348 } 348 }
349 349
350 350
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 CcTest::InitializeVM(TRACE_EXTENSION); 389 CcTest::InitializeVM(TRACE_EXTENSION);
390 v8::HandleScope scope(CcTest::isolate()); 390 v8::HandleScope scope(CcTest::isolate());
391 CHECK_EQ(0, GetJsEntrySp()); 391 CHECK_EQ(0, GetJsEntrySp());
392 CompileRun("a = 1; b = a + 1;"); 392 CompileRun("a = 1; b = a + 1;");
393 CHECK_EQ(0, GetJsEntrySp()); 393 CHECK_EQ(0, GetJsEntrySp());
394 CompileRun("js_entry_sp();"); 394 CompileRun("js_entry_sp();");
395 CHECK_EQ(0, GetJsEntrySp()); 395 CHECK_EQ(0, GetJsEntrySp());
396 CompileRun("js_entry_sp_level2();"); 396 CompileRun("js_entry_sp_level2();");
397 CHECK_EQ(0, GetJsEntrySp()); 397 CHECK_EQ(0, GetJsEntrySp());
398 } 398 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698