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

Side by Side Diff: test/cctest/trace-extension.cc

Issue 638633002: Tick processor: Print C++ entry points (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 2 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
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/tools/tickprocessor-test.default » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 trace_env.sample = sample; 84 trace_env.sample = sample;
85 } 85 }
86 86
87 87
88 void TraceExtension::DoTrace(Address fp) { 88 void TraceExtension::DoTrace(Address fp) {
89 RegisterState regs; 89 RegisterState regs;
90 regs.fp = fp; 90 regs.fp = fp;
91 // sp is only used to define stack high bound 91 // sp is only used to define stack high bound
92 regs.sp = 92 regs.sp =
93 reinterpret_cast<Address>(trace_env.sample) - 10240; 93 reinterpret_cast<Address>(trace_env.sample) - 10240;
94 trace_env.sample->Init(CcTest::i_isolate(), regs); 94 trace_env.sample->Init(CcTest::i_isolate(), regs,
95 TickSample::kSkipCEntryFrame);
95 } 96 }
96 97
97 98
98 void TraceExtension::Trace(const v8::FunctionCallbackInfo<v8::Value>& args) { 99 void TraceExtension::Trace(const v8::FunctionCallbackInfo<v8::Value>& args) {
99 DoTrace(GetFP(args)); 100 DoTrace(GetFP(args));
100 } 101 }
101 102
102 103
103 // Hide c_entry_fp to emulate situation when sampling is done while 104 // Hide c_entry_fp to emulate situation when sampling is done while
104 // pure JS code is being executed 105 // pure JS code is being executed
(...skipping 28 matching lines...) Expand all
133 const v8::FunctionCallbackInfo<v8::Value>& args) { 134 const v8::FunctionCallbackInfo<v8::Value>& args) {
134 v8::HandleScope scope(args.GetIsolate()); 135 v8::HandleScope scope(args.GetIsolate());
135 const Address js_entry_sp = GetJsEntrySp(); 136 const Address js_entry_sp = GetJsEntrySp();
136 CHECK_NE(0, js_entry_sp); 137 CHECK_NE(0, js_entry_sp);
137 CompileRun("js_entry_sp();"); 138 CompileRun("js_entry_sp();");
138 CHECK_EQ(js_entry_sp, GetJsEntrySp()); 139 CHECK_EQ(js_entry_sp, GetJsEntrySp());
139 } 140 }
140 141
141 142
142 } } // namespace v8::internal 143 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | test/mjsunit/tools/tickprocessor-test.default » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698