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

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

Issue 1407533004: [turbofan] Fix various issues with --turbo-inlining enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 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
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/cctest/test-profile-generator.cc » ('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 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 CompileRun(trace_call_buf.start()); 134 CompileRun(trace_call_buf.start());
135 } 135 }
136 136
137 137
138 // This test verifies that stack tracing works when called during 138 // This test verifies that stack tracing works when called during
139 // execution of a native function called from JS code. In this case, 139 // execution of a native function called from JS code. In this case,
140 // TickSample::Trace uses Isolate::c_entry_fp as a starting point for stack 140 // TickSample::Trace uses Isolate::c_entry_fp as a starting point for stack
141 // walking. 141 // walking.
142 TEST(CFromJSStackTrace) { 142 TEST(CFromJSStackTrace) {
143 // BUG(1303) Inlining of JSFuncDoTrace() in JSTrace below breaks this test. 143 // BUG(1303) Inlining of JSFuncDoTrace() in JSTrace below breaks this test.
144 i::FLAG_turbo_inlining = false;
144 i::FLAG_use_inlining = false; 145 i::FLAG_use_inlining = false;
145 146
146 TickSample sample; 147 TickSample sample;
147 i::TraceExtension::InitTraceEnv(&sample); 148 i::TraceExtension::InitTraceEnv(&sample);
148 149
149 v8::HandleScope scope(CcTest::isolate()); 150 v8::HandleScope scope(CcTest::isolate());
150 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); 151 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION);
151 v8::Context::Scope context_scope(context); 152 v8::Context::Scope context_scope(context);
152 153
153 // Create global function JSFuncDoTrace which calls 154 // Create global function JSFuncDoTrace which calls
(...skipping 28 matching lines...) Expand all
182 183
183 184
184 // This test verifies that stack tracing works when called during 185 // This test verifies that stack tracing works when called during
185 // execution of JS code. However, as calling TickSample::Trace requires 186 // execution of JS code. However, as calling TickSample::Trace requires
186 // entering native code, we can only emulate pure JS by erasing 187 // entering native code, we can only emulate pure JS by erasing
187 // Isolate::c_entry_fp value. In this case, TickSample::Trace uses passed frame 188 // Isolate::c_entry_fp value. In this case, TickSample::Trace uses passed frame
188 // pointer value as a starting point for stack walking. 189 // pointer value as a starting point for stack walking.
189 TEST(PureJSStackTrace) { 190 TEST(PureJSStackTrace) {
190 // This test does not pass with inlining enabled since inlined functions 191 // This test does not pass with inlining enabled since inlined functions
191 // don't appear in the stack trace. 192 // don't appear in the stack trace.
193 i::FLAG_turbo_inlining = false;
192 i::FLAG_use_inlining = false; 194 i::FLAG_use_inlining = false;
193 195
194 TickSample sample; 196 TickSample sample;
195 i::TraceExtension::InitTraceEnv(&sample); 197 i::TraceExtension::InitTraceEnv(&sample);
196 198
197 v8::HandleScope scope(CcTest::isolate()); 199 v8::HandleScope scope(CcTest::isolate());
198 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); 200 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION);
199 v8::Context::Scope context_scope(context); 201 v8::Context::Scope context_scope(context);
200 202
201 // Create global function JSFuncDoTrace which calls 203 // Create global function JSFuncDoTrace which calls
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION); 279 v8::Local<v8::Context> context = CcTest::NewContext(TRACE_EXTENSION);
278 v8::Context::Scope context_scope(context); 280 v8::Context::Scope context_scope(context);
279 CHECK(!i::TraceExtension::GetJsEntrySp()); 281 CHECK(!i::TraceExtension::GetJsEntrySp());
280 CompileRun("a = 1; b = a + 1;"); 282 CompileRun("a = 1; b = a + 1;");
281 CHECK(!i::TraceExtension::GetJsEntrySp()); 283 CHECK(!i::TraceExtension::GetJsEntrySp());
282 CompileRun("js_entry_sp();"); 284 CompileRun("js_entry_sp();");
283 CHECK(!i::TraceExtension::GetJsEntrySp()); 285 CHECK(!i::TraceExtension::GetJsEntrySp());
284 CompileRun("js_entry_sp_level2();"); 286 CompileRun("js_entry_sp_level2();");
285 CHECK(!i::TraceExtension::GetJsEntrySp()); 287 CHECK(!i::TraceExtension::GetJsEntrySp());
286 } 288 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap-profiler.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698