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

Unified Diff: test/cctest/test-log-ia32.cc

Issue 39009: Dump more stack frames to perf log when executing a C++ function. (Closed)
Patch Set: Changes according to Soren's comments Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/top.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-log-ia32.cc
diff --git a/test/cctest/test-log-ia32.cc b/test/cctest/test-log-ia32.cc
index 9e2d2f4a6dd30448342b1a1356fd3a9a470c6b40..6d127158147fdb40f52a543ebac10f7ece99b780 100644
--- a/test/cctest/test-log-ia32.cc
+++ b/test/cctest/test-log-ia32.cc
@@ -43,7 +43,7 @@ static void InitTraceEnv(StackTracer* tracer, TickSample* sample) {
static void DoTrace(unsigned int fp) {
trace_env.sample->fp = fp;
// something that is less than fp
- trace_env.sample->sp = trace_env.sample->fp - sizeof(unsigned int);
+ trace_env.sample->sp = trace_env.sample->fp - 100;
trace_env.tracer->Trace(trace_env.sample);
}
@@ -217,15 +217,18 @@ TEST(PureJSStackTrace) {
" JSFuncDoTrace();"
"};\n"
"JSTrace();");
+ CHECK_NE(0, *(sample.stack));
+ CheckRetAddrIsInFunction(
+ reinterpret_cast<unsigned int>(sample.stack[0]),
+ reinterpret_cast<unsigned int>(call_trace_code->instruction_start()),
+ call_trace_code->instruction_size());
Handle<JSFunction> js_trace(JSFunction::cast(*(v8::Utils::OpenHandle(
*GetGlobalProperty("JSTrace")))));
v8::internal::Code* js_trace_code = js_trace->code();
CheckRetAddrIsInFunction(
- reinterpret_cast<unsigned int>(sample.stack[0]),
+ reinterpret_cast<unsigned int>(sample.stack[1]),
reinterpret_cast<unsigned int>(js_trace_code->instruction_start()),
js_trace_code->instruction_size());
- CHECK_EQ(0, sample.stack[1]);
}
#endif // ENABLE_LOGGING_AND_PROFILING
-
« no previous file with comments | « src/top.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698