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

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

Issue 546089: Fix issue 553: function frame is skipped in profile when compare stub is called. (Closed)
Patch Set: Introduced dedicated log event types, added stuff for DevTools 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 | « test/cctest/test-log.cc ('k') | test/mjsunit/tools/logreader.js » ('j') | 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 29 matching lines...) Expand all
40 TickSample* sample; 40 TickSample* sample;
41 } trace_env = { NULL }; 41 } trace_env = { NULL };
42 42
43 43
44 static void InitTraceEnv(TickSample* sample) { 44 static void InitTraceEnv(TickSample* sample) {
45 trace_env.sample = sample; 45 trace_env.sample = sample;
46 } 46 }
47 47
48 48
49 static void DoTrace(Address fp) { 49 static void DoTrace(Address fp) {
50 trace_env.sample->fp = reinterpret_cast<uintptr_t>(fp); 50 trace_env.sample->fp = fp;
51 // sp is only used to define stack high bound 51 // sp is only used to define stack high bound
52 trace_env.sample->sp = 52 trace_env.sample->sp =
53 reinterpret_cast<uintptr_t>(trace_env.sample) - 10240; 53 reinterpret_cast<Address>(trace_env.sample) - 10240;
54 StackTracer::Trace(trace_env.sample); 54 StackTracer::Trace(trace_env.sample);
55 } 55 }
56 56
57 57
58 // Hide c_entry_fp to emulate situation when sampling is done while 58 // Hide c_entry_fp to emulate situation when sampling is done while
59 // pure JS code is being executed 59 // pure JS code is being executed
60 static void DoTraceHideCEntryFPAddress(Address fp) { 60 static void DoTraceHideCEntryFPAddress(Address fp) {
61 v8::internal::Address saved_c_frame_fp = *(Top::c_entry_fp_address()); 61 v8::internal::Address saved_c_frame_fp = *(Top::c_entry_fp_address());
62 CHECK(saved_c_frame_fp); 62 CHECK(saved_c_frame_fp);
63 *(Top::c_entry_fp_address()) = 0; 63 *(Top::c_entry_fp_address()) = 0;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 CHECK_EQ(0, GetJsEntrySp()); 363 CHECK_EQ(0, GetJsEntrySp());
364 CompileRun("a = 1; b = a + 1;"); 364 CompileRun("a = 1; b = a + 1;");
365 CHECK_EQ(0, GetJsEntrySp()); 365 CHECK_EQ(0, GetJsEntrySp());
366 CompileRun("js_entry_sp();"); 366 CompileRun("js_entry_sp();");
367 CHECK_EQ(0, GetJsEntrySp()); 367 CHECK_EQ(0, GetJsEntrySp());
368 CompileRun("js_entry_sp_level2();"); 368 CompileRun("js_entry_sp_level2();");
369 CHECK_EQ(0, GetJsEntrySp()); 369 CHECK_EQ(0, GetJsEntrySp());
370 } 370 }
371 371
372 #endif // ENABLE_LOGGING_AND_PROFILING 372 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « test/cctest/test-log.cc ('k') | test/mjsunit/tools/logreader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698