diff options
author | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-15 17:25:24 +0000 |
---|---|---|
committer | daney <daney@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-15 17:25:24 +0000 |
commit | 53973c81d70dccdd1e1ca48555ddf8620c652bcd (patch) | |
tree | ecd80f4d6cba05c29ed9420459814c84387b36bf /gcc/java | |
parent | 1e5e88e66f071071c698ff0f323f11220e2050da (diff) | |
download | gcc-53973c81d70dccdd1e1ca48555ddf8620c652bcd.tar.gz |
gcc/java:
2007-02-15 David Daney <ddaney@avtrex.com>
* Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
(java.maintainer-clean):Add gc-analyze.1.
(.INTERMEDIATE): Add gc-analyze.pod.
(gc-analyze.pod): New rule.
(java.install-man): Install gc-analyze.1
* gcj.texi: Add new section for the gc-analyze program.
libjava:
2007-02-15 Johannes Schmidt <jschmidt@avtrex.com>
David Daney <ddaney@avtrex.com>
* configure.ac: Create vm-tools-packages file. Add
gnu/gcj/tools/gc_analyze to standard.omit and vm-tools-packages.
Check for /proc/self/maps.
* Makefile.am (bin_PROGRAMS): Added gc-analyze.
(gc_analyze_SOURCES): New.
(gc_analyze_LDFLAGS): New.
(gc_analyze_LINK): New.
(gc_analyze_LDADD): New.
(gc_analyze_DEPENDENCIES): New.
(nat_source_files): Add gnu/gcj/util/natGCInfo.cc.
* Makefile.in: Regenerated.
* configure: Regenerated.
* include/config.h.in: Regenerated.
* sources.am: Regenerated.
* scripts/makemake.tcl: Don't include gc-analyze classes in libgcj.
* gnu/gcj/tools/gc_analyze/SymbolLookup.java: New.
* gnu/gcj/tools/gc_analyze/ObjectMap.java: New.
* gnu/gcj/tools/gc_analyze/MemoryMap.java: New.
* gnu/gcj/tools/gc_analyze/SymbolTable.java: New.
* gnu/gcj/tools/gc_analyze/BlockMap.java: New.
* gnu/gcj/tools/gc_analyze/BytePtr.java: New.
* gnu/gcj/tools/gc_analyze/ItemList.java: New.
* gnu/gcj/tools/gc_analyze/ToolPrefix.java: New.
* gnu/gcj/tools/gc_analyze/MemoryAnalyze.java: New.
* gnu/gcj/util/GCInfo.java: New.
* gnu/gcj/util/GCInfo.h: New.
* gnu/gcj/util/natGCInfo.cc: New.
* gnu/gcj/util/UtilPermission.java: New.
* gnu/gcj/util/UtilPermission.h: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/SymbolTable.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/ObjectMap$ObjectItem.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryMap$RangeComparator.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/BlockMap$PtrMarks.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryMap$Range.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/BlockMap.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/BytePtr.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$SubstringComparator.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/ItemList.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/ToolPrefix.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$1$Info.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$1.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$2.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$3.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$4.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryAnalyze$OptionParser.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/BlockMap$SizeKind.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/SymbolLookup.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/ObjectMap.class: New.
* classpath/tools/gnu/gcj/tools/gc_analyze/MemoryMap.class: New.
* classpath/lib/gnu/gcj/util/GCInfo.class: New.
* classpath/lib/gnu/gcj/util/UtilPermission.class: New.
libjava/classpath:
2007-02-15 David Daney <ddaney@avtrex.com>
* tools/Makefile.am (TOOLS_ZIP): Add classes from vm-tools-packages.
* tools/Makefile.in: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122007 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/java/Make-lang.in | 11 | ||||
-rw-r--r-- | gcc/java/gcj.texi | 88 |
3 files changed, 103 insertions, 5 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 03c4f962e15..f9ef73fb28e 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2007-02-15 David Daney <ddaney@avtrex.com> + + * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1. + (java.maintainer-clean):Add gc-analyze.1. + (.INTERMEDIATE): Add gc-analyze.pod. + (gc-analyze.pod): New rule. + (java.install-man): Install gc-analyze.1 + * gcj.texi: Add new section for the gc-analyze program. + 2007-02-07 Andrew Haley <aph@redhat.com> * class.c (uncache_this_class_ref): New. diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index f1c347ffeb1..a2024948a71 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -139,7 +139,7 @@ java.pdf: doc/gcj.pdf java.html: $(build_htmldir)/java/index.html JAVA_MANFILES = doc/gcj.1 doc/jcf-dump.1 doc/gij.1 \ doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \ - doc/gcj-dbtool.1 + doc/gcj-dbtool.1 doc/gc-analyze.1 java.man: $(JAVA_MANFILES) @@ -208,6 +208,7 @@ java.maintainer-clean: -rm -f $(docobjdir)/grmic.1 -rm -f $(docobjdir)/grmiregistry.1 -rm -f $(docobjdir)/gcj-dbtool.1 + -rm -f $(docobjdir)/gc-analyze.1 # # Stage hooks: # The main makefile has already created stage?/java. @@ -318,7 +319,7 @@ $(build_htmldir)/java/index.html: $(TEXI_JAVA_FILES) $(TEXI2HTML) -I $(gcc_docdir)/include -I $(srcdir)/java -o $(@D) $< .INTERMEDIATE: gcj.pod jcf-dump.pod gij.pod \ - jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod + jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod gc-analyze.pod gcj.pod: java/gcj.texi -$(TEXI2POD) -D gcj < $< > $@ @@ -334,15 +335,17 @@ grmiregistry.pod: java/gcj.texi -$(TEXI2POD) -D grmiregistry < $< > $@ gcj-dbtool.pod: java/gcj.texi -$(TEXI2POD) -D gcj-dbtool < $< > $@ +gc-analyze.pod: java/gcj.texi + -$(TEXI2POD) -D gc-analyze < $< > $@ # Install the man pages. java.install-man: installdirs \ $(DESTDIR)$(man1dir)/$(JAVA_INSTALL_NAME)$(man1ext) \ $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS:%=doc/%.1) \ doc/gij.1 doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \ - doc/gcj-dbtool.1 + doc/gcj-dbtool.1 doc/gc-analyze.1 for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \ - gij jv-convert grmic grmiregistry gcj-dbtool ; do \ + gij jv-convert grmic grmiregistry gcj-dbtool gc-analyze ; do \ tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \ man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \ rm -f $$man_name ; \ diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi index aa86ba489ea..8bd9d5bcfb6 100644 --- a/gcc/java/gcj.texi +++ b/gcc/java/gcj.texi @@ -17,7 +17,7 @@ @c the word ``Java'. @c When this manual is copyrighted. -@set copyrights-gcj 2001, 2002, 2003, 2004, 2005 +@set copyrights-gcj 2001, 2002, 2003, 2004, 2005, 2006, 2007 @c Versions @set which-gcj GCC-@value{version-GCC} @@ -79,6 +79,8 @@ man page gfdl(7). Generate stubs for Remote Method Invocation. * grmiregistry: (gcj)Invoking grmiregistry. The remote object registry. +* gc-analyze: (gcj)Invoking gc-analyze. + Analyze Garbage Collector (GC) memory dumps. @end direntry @end format @@ -125,6 +127,7 @@ files and object files, and it can read both Java source code and * Invoking jv-convert:: Converting from one encoding to another * Invoking grmic:: Generate stubs for Remote Method Invocation. * Invoking grmiregistry:: The remote object registry. +* Invoking gc-analyze:: Analyze Garbage Collector (GC) memory dumps. * About CNI:: Description of the Compiled Native Interface * System properties:: Modifying runtime behavior of the libgcj library * Resources:: Where to look for more information @@ -1412,6 +1415,89 @@ Print version information, then exit. @c man end +@node Invoking gc-analyze +@chapter Invoking gc-analyze + +@c man title gc-analyze Analyze Garbage Collector (GC) memory dumps + +@c man begin SYNOPSIS gc-analyze +@command{gc-analyze} [@option{OPTION}] @dots{} [@var{file}] +@ignore + [@option{-v}] + [@option{--verbose}] + [@option{-p} @var{tool-prefix}] + [@option{-d} @var{directory}] + [@option{--version}] + [@option{--help}] +@end ignore +@c man end + +@c man begin DESCRIPTION gc-analyze + +@command{gc-analyze} prints an analysis of a GC memory dump to +standard out. + +The memory dumps may be created by calling +@code{gnu.gcj.util.GCInfo.enumerate(String namePrefix)} from java +code. A memory dump will be created on an out of memory condition if +@code{gnu.gcj.util.GCInfo.setOOMDump(String namePrefix)} is called +before the out of memory occurs. + +Running this program will create two files: @file{TestDump001} and +@file{TestDump001.bytes}. + +@example +import gnu.gcj.util.*; +import java.util.*; + +public class GCDumpTest +@{ + static public void main(String args[]) + @{ + ArrayList<String> l = new ArrayList<String>(1000); + + for (int i = 1; i < 1500; i++) @{ + l.add("This is string #" + i); + @} + GCInfo.enumerate("TestDump"); + @} +@} +@end example + +The memory dump may then be displayed by running: + +@example +gc-analyze -v TestDump001 +@end example + +@c FIXME: Add real information here. +@c This really isn't much more than the --help output. + +@c man end + +@c man begin OPTIONS gc-analyze + +@table @gcctabopt +@item --verbose +@itemx -v +Verbose output. + +@item -p @var{tool-prefix} +Prefix added to the names of the @command{nm} and @command{readelf} commands. + +@item -d @var{directory} +Directory that contains the executable and shared libraries used when +the dump was generated. + +@item --help +Print a help message, then exit. + +@item --version +Print version information, then exit. +@end table + +@c man end + @node About CNI @chapter About CNI |