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

Side by Side Diff: src/runtime-profiler.cc

Issue 9837004: Port count-based profiler to ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 8 years, 9 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/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 if (FLAG_trace_osr) { 166 if (FLAG_trace_osr) {
167 PrintF("[patching stack checks in "); 167 PrintF("[patching stack checks in ");
168 function->PrintName(); 168 function->PrintName();
169 PrintF(" for on-stack replacement]\n"); 169 PrintF(" for on-stack replacement]\n");
170 } 170 }
171 171
172 // Get the stack check stub code object to match against. We aren't 172 // Get the stack check stub code object to match against. We aren't
173 // prepared to generate it, but we don't expect to have to. 173 // prepared to generate it, but we don't expect to have to.
174 bool found_code = false; 174 bool found_code = false;
175 Code* stack_check_code = NULL; 175 Code* stack_check_code = NULL;
176 #ifdef V8_TARGET_ARCH_IA32 176 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
177 if (FLAG_count_based_interrupts) { 177 if (FLAG_count_based_interrupts) {
178 InterruptStub interrupt_stub; 178 InterruptStub interrupt_stub;
179 found_code = interrupt_stub.FindCodeInCache(&stack_check_code); 179 found_code = interrupt_stub.FindCodeInCache(&stack_check_code);
180 } else // NOLINT 180 } else // NOLINT
181 #endif 181 #endif
182 { // NOLINT 182 { // NOLINT
183 StackCheckStub check_stub; 183 StackCheckStub check_stub;
184 found_code = check_stub.FindCodeInCache(&stack_check_code); 184 found_code = check_stub.FindCodeInCache(&stack_check_code);
185 } 185 }
186 if (found_code) { 186 if (found_code) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // this as part of collecting them because this will interfere with 337 // this as part of collecting them because this will interfere with
338 // the sample lookup in case of recursive functions. 338 // the sample lookup in case of recursive functions.
339 for (int i = 0; i < sample_count; i++) { 339 for (int i = 0; i < sample_count; i++) {
340 AddSample(samples[i], kSamplerFrameWeight[i]); 340 AddSample(samples[i], kSamplerFrameWeight[i]);
341 } 341 }
342 } 342 }
343 } 343 }
344 344
345 345
346 void RuntimeProfiler::NotifyTick() { 346 void RuntimeProfiler::NotifyTick() {
347 #ifdef V8_TARGET_ARCH_IA32 347 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
348 if (FLAG_count_based_interrupts) return; 348 if (FLAG_count_based_interrupts) return;
349 #endif 349 #endif
350 isolate_->stack_guard()->RequestRuntimeProfilerTick(); 350 isolate_->stack_guard()->RequestRuntimeProfilerTick();
351 } 351 }
352 352
353 353
354 void RuntimeProfiler::SetUp() { 354 void RuntimeProfiler::SetUp() {
355 ASSERT(has_been_globally_set_up_); 355 ASSERT(has_been_globally_set_up_);
356 if (!FLAG_watch_ic_patching) { 356 if (!FLAG_watch_ic_patching) {
357 ClearSampleBuffer(); 357 ClearSampleBuffer();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 467
468 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 468 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
469 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 469 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
470 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 470 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
471 } 471 }
472 return false; 472 return false;
473 } 473 }
474 474
475 475
476 } } // namespace v8::internal 476 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698