Patch: RFA: gcj.texi updates

Tom Tromey tromey@redhat.com
Tue Nov 30 01:03:00 GMT 2004


This patch updates gcj.texi to document gcj-dbtool,
-findirect-dispatch, and the new libgcj properties.

Ok?

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
	(java.uninstall): Likewise.
	(java.maintainer-clean): Likewise.
	(.INTERMEDIATE): Likewise.
	(java.install-man): Likewise.
	(gcj-dbtool.pod): New target.
	* gcj.texi (Code Generation): Document -findirect-dispatch.
	(libgcj Runtime Properties): Document
	gnu.gcj.precompiled.db.path.
	(Top): Link to "Invoking gcj-dbtool".

Index: Make-lang.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Make-lang.in,v
retrieving revision 1.149
diff -u -r1.149 Make-lang.in
--- Make-lang.in 25 Nov 2004 03:46:39 -0000 1.149
+++ Make-lang.in 30 Nov 2004 00:09:05 -0000
@@ -177,7 +177,8 @@
 dvi:: doc/gcj.dvi
 html:: $(htmldir)/java/index.html
 JAVA_MANFILES = doc/gcj.1 doc/gcjh.1 doc/jv-scan.1 doc/jcf-dump.1 doc/gij.1 \
-                doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1
+                doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
+		doc/gcj-dbtool.1
 
 java.man: $(JAVA_MANFILES)
 
@@ -235,6 +236,7 @@
 	-rm -rf $(DESTDIR)$(man1dir)/jcf-dump$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/gij$(man1ext)
 	-rm -rf $(DESTDIR)$(man1dir)/jv-convert$(man1ext)
+	-rm -rf $(DESTDIR)$(man1dir)/gcj-dbtool$(man1ext)
 
 install-info:: $(DESTDIR)$(infodir)/gcj.info
 
@@ -259,6 +261,7 @@
 	-rm -f $(docobjdir)/jv-convert.1
 	-rm -f $(docobjdir)/grmic.1
 	-rm -f $(docobjdir)/grmiregistry.1
+	-rm -f $(docobjdir)/gcj-dbtool.1
 #
 # Stage hooks:
 # The main makefile has already created stage?/java.
@@ -398,7 +401,7 @@
 	$(TEXI2HTML) -I $(docdir)/include -I $(srcdir)/java -o $(@D) $<
 
 .INTERMEDIATE: gcj.pod gcjh.pod jv-scan.pod jcf-dump.pod gij.pod \
-  jv-convert.pod grmic.pod grmiregistry.pod
+  jv-convert.pod grmic.pod grmiregistry.pod gcj-dbtool.pod
 
 gcj.pod: java/gcj.texi
 	-$(TEXI2POD) -D gcj < $< > $@
@@ -416,14 +419,17 @@
 	-$(TEXI2POD) -D grmic < $< > $@
 grmiregistry.pod: java/gcj.texi
 	-$(TEXI2POD) -D grmiregistry < $< > $@
+gcj-dbtool.pod: java/gcj.texi
+	-$(TEXI2POD) -D gcj-dbtool < $< > $@
 
 # 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/gij.1 doc/jv-convert.1 doc/grmic.1 doc/grmiregistry.1 \
+		  doc/gcj-dbtool.1
 	for tool in $(JAVA_TARGET_INDEPENDENT_BIN_TOOLS) \
-		gij jv-convert grmic grmiregistry ; do \
+		gij jv-convert grmic grmiregistry gcj-dbtool ; do \
 	  tool_transformed_name=`echo $$tool|sed '$(program_transform_name)'`; \
 	  man_name=$(DESTDIR)$(man1dir)/$${tool_transformed_name}$(man1ext); \
 	  rm -f $$man_name ; \
Index: gcj.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gcj.texi,v
retrieving revision 1.68
diff -u -r1.68 gcj.texi
--- gcj.texi 25 Nov 2004 03:46:39 -0000 1.68
+++ gcj.texi 30 Nov 2004 00:09:06 -0000
@@ -64,6 +64,8 @@
 * jcf-dump: (gcj)Invoking jcf-dump.
                             Print information about Java class files
 * gij: (gcj)Invoking gij.   GNU interpreter for Java bytecode
+* gcj-dbtool: (gcj)Invoking gcj-dbtool.
+                            Tool for manipulating class file databases.
 * jv-convert: (gcj)Invoking jv-convert.
                             Convert file from one encoding to another
 * grmic: (gcj)Invoking grmic.
@@ -112,8 +114,9 @@
 * Invoking jv-scan::    Print information about source files
 * Invoking jcf-dump::   Print information about class files
 * Invoking gij::	Interpreting Java bytecodes
+* Invoking gcj-dbtool:: Tool for manipulating class file databases.
 * Invoking jv-convert:: Converting from one encoding to another
-* Invoking grmic::        Generate stubs for Remote Method Invocation.
+* Invoking grmic::      Generate stubs for Remote Method Invocation.
 * Invoking grmiregistry:: The remote object registry.
 * About CNI::           Description of the Compiled Native Interface
 * System properties::   Modifying runtime behavior of the libgcj library
@@ -492,6 +495,20 @@
 So this flag isn't very useful yet, except to partially override
 @code{--disable-assertions}.
 
+@item -findirect-dispatch
+@command{gcj} has a special binary compatibility ABI, which is
+enabled by the @code{-findirect-dispatch} option.  In this mode, the
+code generated by @command{gcj} does not need to be directly linked
+against its dependencies.  Instead, all dependencies will be looked
+up at runtime.  This allows free mixing of interpreted and compiled
+code.  Code compiled with this flag will obey the guarantees in the
+binary compatibility chapter of the Java Language Specification.
+
+Note that, at present, @code{-findirect-dispatch} can only be used
+when compiling @file{.class} files.  It will not work when compiling
+from source.  CNI also does not yet work with the binary compatibility
+ABI.  These restrictions will be lifted in some future release.
+
 @end table
 
 
@@ -961,6 +978,70 @@
 
 @c man end
 
+@node Invoking gcj-dbtool
+@chapter Invoking gcj-dbtool.
+
+@c man title gcj-dbtool Manipulate class file mapping databases for libgcj
+
+@ignore
+@c man begin SYNOPSIS gcj-dbtool
+gcj-dbtool @option{OPTION} @var{DBFILE} [@option{MORE}] @dots{}
+
+gcj-dbtool [@option{-n}] [@option{-a}] [@option{-t}] [@option{-l}]
+  [@option{-v}] [@option{--version}] [@option{--help}]
+
+@c man end
+@c man begin SEEALSO gij
+gcc(1), gcj(1), gcjh(1), jv-scan(1), jcf-dump(1), gfdl(7),
+and the Info entries for @file{gcj} and @file{gcc}.
+@c man end
+@end ignore
+
+@c man begin DESCRIPTION gcj-dbtool
+
+@code{gcj-dbtool} is a tool for creating and manipulating class file
+mapping databases.  @code{libgcj} can use these databases to find a
+shared library corresponding to the bytecode representation of a
+class.  This functionality is useful for ahead-of-time compilation of
+a program that has no knowledge of @code{gcj}.
+
+@code{gcj-dbtool} works best if all the jar files added to it are
+compiled using @code{-findirect-dispatch}.
+
+@c man end
+
+@c man begin OPTIONS gcj-dbtool
+
+@table @gcctabopt
+@item -n @var{DBFILE} [@var{SIZE}]
+This creates a new database.  Currently, databases cannot be resized;
+you can choose a larger initial size if desired.  The default size is
+32,749.
+
+@item -a @var{DBFILE} @var{JARFILE} @var{LIB}
+This adds a jar file to the database.  For each class file in the jar,
+a cryptographic signature of the bytecode representation of the class
+is recorded in the database.  At runtime, a class is looked up by its
+signature and the compiled form of the class is looked for in the
+corresponding shared library.
+
+@item -t @var{DBFILE}
+Test a database.
+
+@item -l @var{DBFILE}
+List the contents of a database.
+
+@item --help
+Print a help message, then exit.
+
+@item --version
+@itemx -v
+Print version information, then exit.
+
+@end table
+
+@c man end
+
 @node Invoking jv-convert
 @chapter Invoking jv-convert
 
@@ -2404,6 +2485,12 @@
 stored.  If not set, JIT compilation is disabled.  This should never
 be set to a directory that is writable by any other user.
 
+@item gnu.gcj.precompiled.db.path
+This is a sequence of file names, each referring to a file created by
+@command{gcj-dbtool}.  These files will be used by @code{libgcj} to
+find shared libraries corresponding to classes that are loaded from
+bytecode.
+
 @end table
 
 



More information about the Gcc-patches mailing list