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 5712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5723 // and print some interesting cpu debugging info. | 5723 // and print some interesting cpu debugging info. |
5724 JavaScriptFrameIterator it; | 5724 JavaScriptFrameIterator it; |
5725 JavaScriptFrame* frame = it.frame(); | 5725 JavaScriptFrame* frame = it.frame(); |
5726 PrintF("fp = %p, sp = %p, caller_sp = %p: ", | 5726 PrintF("fp = %p, sp = %p, caller_sp = %p: ", |
5727 frame->fp(), frame->sp(), frame->caller_sp()); | 5727 frame->fp(), frame->sp(), frame->caller_sp()); |
5728 } else { | 5728 } else { |
5729 PrintF("DebugPrint: "); | 5729 PrintF("DebugPrint: "); |
5730 } | 5730 } |
5731 args[0]->Print(); | 5731 args[0]->Print(); |
5732 if (args[0]->IsHeapObject()) { | 5732 if (args[0]->IsHeapObject()) { |
5733 PrintF("\n"); | |
antonm
2010/03/05 13:40:38
is it intentional?
Søren Thygesen Gjesse
2010/03/05 13:42:59
Yes, I used %DebugPrint for debugging, and without
| |
5733 HeapObject::cast(args[0])->map()->Print(); | 5734 HeapObject::cast(args[0])->map()->Print(); |
5734 } | 5735 } |
5735 #else | 5736 #else |
5736 // ShortPrint is available in release mode. Print is not. | 5737 // ShortPrint is available in release mode. Print is not. |
5737 args[0]->ShortPrint(); | 5738 args[0]->ShortPrint(); |
5738 #endif | 5739 #endif |
5739 PrintF("\n"); | 5740 PrintF("\n"); |
5740 Flush(); | 5741 Flush(); |
5741 | 5742 |
5742 return args[0]; // return TOS | 5743 return args[0]; // return TOS |
(...skipping 2803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8546 } else { | 8547 } else { |
8547 // Handle last resort GC and make sure to allow future allocations | 8548 // Handle last resort GC and make sure to allow future allocations |
8548 // to grow the heap without causing GCs (if possible). | 8549 // to grow the heap without causing GCs (if possible). |
8549 Counters::gc_last_resort_from_js.Increment(); | 8550 Counters::gc_last_resort_from_js.Increment(); |
8550 Heap::CollectAllGarbage(false); | 8551 Heap::CollectAllGarbage(false); |
8551 } | 8552 } |
8552 } | 8553 } |
8553 | 8554 |
8554 | 8555 |
8555 } } // namespace v8::internal | 8556 } } // namespace v8::internal |
OLD | NEW |