OLD | NEW |
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 12127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12138 EnterDebugger enter_debugger; | 12138 EnterDebugger enter_debugger; |
12139 return LiveObjectList::Summarize(id1, id2, filter_obj); | 12139 return LiveObjectList::Summarize(id1, id2, filter_obj); |
12140 #else | 12140 #else |
12141 return isolate->heap()->undefined_value(); | 12141 return isolate->heap()->undefined_value(); |
12142 #endif | 12142 #endif |
12143 } | 12143 } |
12144 | 12144 |
12145 #endif // ENABLE_DEBUGGER_SUPPORT | 12145 #endif // ENABLE_DEBUGGER_SUPPORT |
12146 | 12146 |
12147 | 12147 |
12148 #ifdef ENABLE_LOGGING_AND_PROFILING | |
12149 RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerResume) { | 12148 RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerResume) { |
12150 NoHandleAllocation ha; | 12149 NoHandleAllocation ha; |
12151 v8::V8::ResumeProfiler(); | 12150 v8::V8::ResumeProfiler(); |
12152 return isolate->heap()->undefined_value(); | 12151 return isolate->heap()->undefined_value(); |
12153 } | 12152 } |
12154 | 12153 |
12155 | 12154 |
12156 RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerPause) { | 12155 RUNTIME_FUNCTION(MaybeObject*, Runtime_ProfilerPause) { |
12157 NoHandleAllocation ha; | 12156 NoHandleAllocation ha; |
12158 v8::V8::PauseProfiler(); | 12157 v8::V8::PauseProfiler(); |
12159 return isolate->heap()->undefined_value(); | 12158 return isolate->heap()->undefined_value(); |
12160 } | 12159 } |
12161 | 12160 |
12162 #endif // ENABLE_LOGGING_AND_PROFILING | |
12163 | 12161 |
12164 // Finds the script object from the script data. NOTE: This operation uses | 12162 // Finds the script object from the script data. NOTE: This operation uses |
12165 // heap traversal to find the function generated for the source position | 12163 // heap traversal to find the function generated for the source position |
12166 // for the requested break point. For lazily compiled functions several heap | 12164 // for the requested break point. For lazily compiled functions several heap |
12167 // traversals might be required rendering this operation as a rather slow | 12165 // traversals might be required rendering this operation as a rather slow |
12168 // operation. However for setting break points which is normally done through | 12166 // operation. However for setting break points which is normally done through |
12169 // some kind of user interaction the performance is not crucial. | 12167 // some kind of user interaction the performance is not crucial. |
12170 static Handle<Object> Runtime_GetScriptFromScriptName( | 12168 static Handle<Object> Runtime_GetScriptFromScriptName( |
12171 Handle<String> script_name) { | 12169 Handle<String> script_name) { |
12172 // Scan the heap for Script objects to find the script with the requested | 12170 // Scan the heap for Script objects to find the script with the requested |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12612 } else { | 12610 } else { |
12613 // Handle last resort GC and make sure to allow future allocations | 12611 // Handle last resort GC and make sure to allow future allocations |
12614 // to grow the heap without causing GCs (if possible). | 12612 // to grow the heap without causing GCs (if possible). |
12615 isolate->counters()->gc_last_resort_from_js()->Increment(); | 12613 isolate->counters()->gc_last_resort_from_js()->Increment(); |
12616 isolate->heap()->CollectAllGarbage(false); | 12614 isolate->heap()->CollectAllGarbage(false); |
12617 } | 12615 } |
12618 } | 12616 } |
12619 | 12617 |
12620 | 12618 |
12621 } } // namespace v8::internal | 12619 } } // namespace v8::internal |
OLD | NEW |