OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 4803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4814 static Object* Runtime_DebugPrint(Arguments args) { | 4814 static Object* Runtime_DebugPrint(Arguments args) { |
4815 NoHandleAllocation ha; | 4815 NoHandleAllocation ha; |
4816 ASSERT(args.length() == 1); | 4816 ASSERT(args.length() == 1); |
4817 | 4817 |
4818 #ifdef DEBUG | 4818 #ifdef DEBUG |
4819 if (args[0]->IsString()) { | 4819 if (args[0]->IsString()) { |
4820 // If we have a string, assume it's a code "marker" | 4820 // If we have a string, assume it's a code "marker" |
4821 // and print some interesting cpu debugging info. | 4821 // and print some interesting cpu debugging info. |
4822 JavaScriptFrameIterator it; | 4822 JavaScriptFrameIterator it; |
4823 JavaScriptFrame* frame = it.frame(); | 4823 JavaScriptFrame* frame = it.frame(); |
4824 PrintF("fp = %p, sp = %p, pp = %p: ", | 4824 PrintF("fp = %p, sp = %p, caller_sp = %p: ", |
4825 frame->fp(), frame->sp(), frame->pp()); | 4825 frame->fp(), frame->sp(), frame->caller_sp()); |
4826 } else { | 4826 } else { |
4827 PrintF("DebugPrint: "); | 4827 PrintF("DebugPrint: "); |
4828 } | 4828 } |
4829 args[0]->Print(); | 4829 args[0]->Print(); |
4830 #else | 4830 #else |
4831 // ShortPrint is available in release mode. Print is not. | 4831 // ShortPrint is available in release mode. Print is not. |
4832 args[0]->ShortPrint(); | 4832 args[0]->ShortPrint(); |
4833 #endif | 4833 #endif |
4834 PrintF("\n"); | 4834 PrintF("\n"); |
4835 Flush(); | 4835 Flush(); |
(...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7104 } else { | 7104 } else { |
7105 // Handle last resort GC and make sure to allow future allocations | 7105 // Handle last resort GC and make sure to allow future allocations |
7106 // to grow the heap without causing GCs (if possible). | 7106 // to grow the heap without causing GCs (if possible). |
7107 Counters::gc_last_resort_from_js.Increment(); | 7107 Counters::gc_last_resort_from_js.Increment(); |
7108 Heap::CollectAllGarbage(); | 7108 Heap::CollectAllGarbage(); |
7109 } | 7109 } |
7110 } | 7110 } |
7111 | 7111 |
7112 | 7112 |
7113 } } // namespace v8::internal | 7113 } } // namespace v8::internal |
OLD | NEW |