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

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

Issue 9835083: MIPS: Port count-based profiler (Closed)
Patch Set: 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
« 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (FLAG_trace_osr) { 168 if (FLAG_trace_osr) {
169 PrintF("[patching stack checks in "); 169 PrintF("[patching stack checks in ");
170 function->PrintName(); 170 function->PrintName();
171 PrintF(" for on-stack replacement]\n"); 171 PrintF(" for on-stack replacement]\n");
172 } 172 }
173 173
174 // Get the stack check stub code object to match against. We aren't 174 // Get the stack check stub code object to match against. We aren't
175 // prepared to generate it, but we don't expect to have to. 175 // prepared to generate it, but we don't expect to have to.
176 bool found_code = false; 176 bool found_code = false;
177 Code* stack_check_code = NULL; 177 Code* stack_check_code = NULL;
178 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM) 178 #if defined(V8_TARGET_ARCH_IA32) || \
179 defined(V8_TARGET_ARCH_ARM) || \
180 defined(V8_TARGET_ARCH_MIPS)
179 if (FLAG_count_based_interrupts) { 181 if (FLAG_count_based_interrupts) {
180 InterruptStub interrupt_stub; 182 InterruptStub interrupt_stub;
181 found_code = interrupt_stub.FindCodeInCache(&stack_check_code); 183 found_code = interrupt_stub.FindCodeInCache(&stack_check_code);
182 } else // NOLINT 184 } else // NOLINT
183 #endif 185 #endif
184 { // NOLINT 186 { // NOLINT
185 StackCheckStub check_stub; 187 StackCheckStub check_stub;
186 found_code = check_stub.FindCodeInCache(&stack_check_code); 188 found_code = check_stub.FindCodeInCache(&stack_check_code);
187 } 189 }
188 if (found_code) { 190 if (found_code) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // this as part of collecting them because this will interfere with 346 // this as part of collecting them because this will interfere with
345 // the sample lookup in case of recursive functions. 347 // the sample lookup in case of recursive functions.
346 for (int i = 0; i < sample_count; i++) { 348 for (int i = 0; i < sample_count; i++) {
347 AddSample(samples[i], kSamplerFrameWeight[i]); 349 AddSample(samples[i], kSamplerFrameWeight[i]);
348 } 350 }
349 } 351 }
350 } 352 }
351 353
352 354
353 void RuntimeProfiler::NotifyTick() { 355 void RuntimeProfiler::NotifyTick() {
354 #if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM) 356 #if defined(V8_TARGET_ARCH_IA32) || \
357 defined(V8_TARGET_ARCH_ARM) || \
358 defined(V8_TARGET_ARCH_MIPS)
355 if (FLAG_count_based_interrupts) return; 359 if (FLAG_count_based_interrupts) return;
356 #endif 360 #endif
357 isolate_->stack_guard()->RequestRuntimeProfilerTick(); 361 isolate_->stack_guard()->RequestRuntimeProfilerTick();
358 } 362 }
359 363
360 364
361 void RuntimeProfiler::SetUp() { 365 void RuntimeProfiler::SetUp() {
362 ASSERT(has_been_globally_set_up_); 366 ASSERT(has_been_globally_set_up_);
363 if (!FLAG_watch_ic_patching) { 367 if (!FLAG_watch_ic_patching) {
364 ClearSampleBuffer(); 368 ClearSampleBuffer();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 478
475 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { 479 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() {
476 if (!RuntimeProfiler::IsSomeIsolateInJS()) { 480 if (!RuntimeProfiler::IsSomeIsolateInJS()) {
477 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); 481 return RuntimeProfiler::WaitForSomeIsolateToEnterJS();
478 } 482 }
479 return false; 483 return false;
480 } 484 }
481 485
482 486
483 } } // namespace v8::internal 487 } } // 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