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

Side by Side Diff: src/runtime.cc

Issue 11437016: Use count-based profiling exclusively. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 8 years 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/platform-win32.cc ('k') | src/runtime-profiler.h » ('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 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 8157 matching lines...) Expand 10 before | Expand all | Expand 10 after
8168 succeeded = false; 8168 succeeded = false;
8169 } 8169 }
8170 } 8170 }
8171 8171
8172 // Revert to the original stack checks in the original unoptimized code. 8172 // Revert to the original stack checks in the original unoptimized code.
8173 if (FLAG_trace_osr) { 8173 if (FLAG_trace_osr) {
8174 PrintF("[restoring original stack checks in "); 8174 PrintF("[restoring original stack checks in ");
8175 function->PrintName(); 8175 function->PrintName();
8176 PrintF("]\n"); 8176 PrintF("]\n");
8177 } 8177 }
8178 Handle<Code> check_code; 8178 InterruptStub interrupt_stub;
8179 if (FLAG_count_based_interrupts) { 8179 Handle<Code> check_code = interrupt_stub.GetCode();
8180 InterruptStub interrupt_stub;
8181 check_code = interrupt_stub.GetCode();
8182 } else // NOLINT
8183 { // NOLINT
8184 StackCheckStub check_stub;
8185 check_code = check_stub.GetCode();
8186 }
8187 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement(); 8180 Handle<Code> replacement_code = isolate->builtins()->OnStackReplacement();
8188 Deoptimizer::RevertStackCheckCode(*unoptimized, 8181 Deoptimizer::RevertStackCheckCode(*unoptimized,
8189 *check_code, 8182 *check_code,
8190 *replacement_code); 8183 *replacement_code);
8191 8184
8192 // Allow OSR only at nesting level zero again. 8185 // Allow OSR only at nesting level zero again.
8193 unoptimized->set_allow_osr_at_loop_nesting_level(0); 8186 unoptimized->set_allow_osr_at_loop_nesting_level(0);
8194 8187
8195 // If the optimization attempt succeeded, return the AST id tagged as a 8188 // If the optimization attempt succeeded, return the AST id tagged as a
8196 // smi. This tells the builtin that we need to translate the unoptimized 8189 // smi. This tells the builtin that we need to translate the unoptimized
(...skipping 5354 matching lines...) Expand 10 before | Expand all | Expand 10 after
13551 // Handle last resort GC and make sure to allow future allocations 13544 // Handle last resort GC and make sure to allow future allocations
13552 // to grow the heap without causing GCs (if possible). 13545 // to grow the heap without causing GCs (if possible).
13553 isolate->counters()->gc_last_resort_from_js()->Increment(); 13546 isolate->counters()->gc_last_resort_from_js()->Increment();
13554 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13547 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13555 "Runtime::PerformGC"); 13548 "Runtime::PerformGC");
13556 } 13549 }
13557 } 13550 }
13558 13551
13559 13552
13560 } } // namespace v8::internal 13553 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698