Mercurial > hg > truffle
comparison src/share/vm/utilities/debug.cpp @ 6152:958bb4b7be49
Merge
author | asaha |
---|---|
date | Tue, 10 Apr 2012 10:42:34 -0700 |
parents | 09d00c18e323 |
children | 6c5b7a6becc8 |
comparison
equal
deleted
inserted
replaced
6151:e778c29768e6 | 6152:958bb4b7be49 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
598 extern "C" void flush() { | 598 extern "C" void flush() { |
599 Command c("flush"); | 599 Command c("flush"); |
600 tty->flush(); | 600 tty->flush(); |
601 } | 601 } |
602 | 602 |
603 | |
604 extern "C" void events() { | 603 extern "C" void events() { |
605 Command c("events"); | 604 Command c("events"); |
606 Events::print_last(tty, 50); | 605 Events::print(); |
607 } | 606 } |
608 | |
609 | |
610 extern "C" void nevents(int n) { | |
611 Command c("events"); | |
612 Events::print_last(tty, n); | |
613 } | |
614 | |
615 | 607 |
616 // Given a heap address that was valid before the most recent GC, if | 608 // Given a heap address that was valid before the most recent GC, if |
617 // the oop that used to contain it is still live, prints the new | 609 // the oop that used to contain it is still live, prints the new |
618 // location of the oop and the address. Useful for tracking down | 610 // location of the oop and the address. Useful for tracking down |
619 // certain kinds of naked oop and oop map bugs. | 611 // certain kinds of naked oop and oop map bugs. |
769 tty->print_cr(" findm(intptr_t pc) - finds methodOop"); | 761 tty->print_cr(" findm(intptr_t pc) - finds methodOop"); |
770 tty->print_cr(" find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it"); | 762 tty->print_cr(" find(intptr_t x) - finds & prints nmethod/stub/bytecode/oop based on pointer into it"); |
771 | 763 |
772 tty->print_cr("misc."); | 764 tty->print_cr("misc."); |
773 tty->print_cr(" flush() - flushes the log file"); | 765 tty->print_cr(" flush() - flushes the log file"); |
774 tty->print_cr(" events() - dump last 50 events"); | 766 tty->print_cr(" events() - dump events from ring buffers"); |
775 | 767 |
776 | 768 |
777 tty->print_cr("compiler debugging"); | 769 tty->print_cr("compiler debugging"); |
778 tty->print_cr(" debug() - to set things up for compiler debugging"); | 770 tty->print_cr(" debug() - to set things up for compiler debugging"); |
779 tty->print_cr(" ndebug() - undo debug"); | 771 tty->print_cr(" ndebug() - undo debug"); |