Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

jvmcfg.h File Reference


Detailed Description

Sizes of JVM items, max number of classes, objects, threads, etc., and other general program configuration.

Notice that the maximum number of items is also dependent on the data type that contains counts of that item. For example, since the thread index is an (unsigned short), there can be no more than 2^16 threads in the system.

NOTES FOR JAVA NATIVE INTERFACE
In order to keep this implementation absolutely independent of any implementation of <jni.h> and subsidiary header files, the following typedefs have been redefined in the JNI portion of these header files:

jvm_object_hash ...found in jlObject.h

jvm_thread_index ...found in jlThread.h

jvm_class_index ...found in jlClass.h

These types are used for function prototypes for JNI code.

Todo:
Add proper searching for 'rt.jar' file and '-bootclasspath'. For the moment, they are defined in config.h as the CONFIG_HACKED_RTJARFILE and CONFIG_HACKED_BOOTCLASSPATH pre-processor symbols and are implemented in classpath.c in this way.

Control

$URL: https://svn.apache.org/path/name/jvmcfg.h $ $Id: jvmcfg.h 0 09/28/2005 dlydick $

Copyright 2005 The Apache Software Foundation or its licensors, as applicable.

Licensed under the Apache License, Version 2.0 ("the License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations under the License.

Version:
$LastChangedRevision: 0 $
Date:
$LastChangedDate: 09/28/2005 $
Author:
$LastChangedBy: dlydick $ Original code contributed by Daniel Lydick on 09/28/2005.
Todo:
Need to evaluate if and when and how to phase out use of the configuration variables CONFIG_HACKED_RTJARFILE and CONFIG_HACKED_BOOTCLASSPATH

For internal use only.

Decide whether or not to use the CONFIG_HACKED_xxx definitions from config.h. Consider two fragments of source code showing with/without comment possibility (immediately follows this note in the source code).

Reference

Definition in file jvmcfg.h.

#include "jrtypes.h"

Go to the source code of this file.

Debug levels for sysDbgMsg().

Set increasingly verbose debug message levels for sysDbgMsg().

Notice that the lowest debug message level setting DML0 indicates that a message using it is probablt a good candidate to be changed to the unconditional sysErrMsg() function instead.

See also:
jvmutil_set_dml()

jvmutil_get_dml()

sysDbgMsg()



#define DMLDEFAULT   DMLNORM
 Initial debug level, may be changed by command line parameter.
#define DMLMAX   DML10
 Convenient alias for DML10.
#define DMLMIN   DML1
 Convenient alias for DML1.
#define DMLNORM   DML5
 Convenient alias for DML5.
#define DMLOFF   DML0
 Convenient alias for DML0.
enum  jvm_debug_level_enum {
  DML0 = 0, DML1 = 1, DML2 = 2, DML3 = 3,
  DML4 = 4, DML5 = 5, DML6 = 6, DML7 = 7,
  DML8 = 8, DML9 = 9, DML10 = 10
}

Standard I/O definitions

The definitions of printf, fprint, and sprintf will co-opt all usual standard I/O operations and encourage the use of the local version of these functions. See stdio.c for details on why this is so.

#define fprintf   _fprintfLocal
#define JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER
 When desired, persuade Eclipse to flush its stdio buffers better by invoking sleep(3) for <= 1 second (with arg of '1').
#define JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER_EXIT   sleep(1)
 Same thing as JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER, but at end of JVM run before exit, try to persuade Eclipse to flush all standard I/O buffers before quitting JVM.
#define JVMCFG_DEBUG_MESSAGE_ENABLE   rtrue
 Enable stderr debug messages using sysDbgMsg() format messages.
#define printf   _printfLocal
#define sprintf   _sprintfLocal

Class table support

#define JVMCFG_BAD_ATTRIBUTE   65535
 Bad attribute slot,usually "not found".
#define JVMCFG_BAD_FIELD   65535
 Bad field slot, usually "not found".
#define JVMCFG_BAD_FIELD_LOOKUP   65535
 Bad lookup slot, usually "not found".
#define JVMCFG_BAD_METHOD   65535
 Bad method slot, usually "not found".
#define JVMCFG_BAD_UNICODE_STRING   65535
 Bad unicode string slot, usually "not found".
#define JVMCFG_FIRST_CLASS   1
 First object slot to allocate.
#define JVMCFG_JLOBJECT_NMO_NULL   0
 Null local method slot, usually "not found".
#define JVMCFG_JLOBJECT_NMO_REGISTER   1
 Reserved local method slot for the registration of local native methods.
#define JVMCFG_JLOBJECT_NMO_UNREGISTER   2
 Reserved local method slot for the un-registration of local native methods.
#define JVMCFG_MAX_CLASSES   200
 Max number of class allocations.
#define JVMCFG_NATIVE_METHOD_ATTRIBUTE   65534
 Native method slot,no code attribute.
#define JVMCFG_NULL_CLASS   0
 Null class slot coincides with hash 0.
typedef u2 jvm_attribute_index
 Attribute table indices all use this type.
typedef rushort jvm_class_index
 Class indices all use this type.
typedef u2 jvm_field_index
 Field table indices all use this type.
typedef u2 jvm_field_lookup_index
 Field table lookups all use this type.
typedef u2 jvm_method_index
 Method table indices all use this type.
typedef unsigned int jvm_native_method_ordinal
 Ordinal number for local native method.
typedef u2 jvm_unicode_string_index
 Unicode string table indices all use this type.
typedef u2 jvm_utf_string_index
 UTF8 string table indices all use this type.
const jvm_attribute_index jvm_attribute_index_bad
 Real machine NULL index for attributes.
const jvm_attribute_index jvm_attribute_index_native
 Real machine marker for native method.
const jvm_class_index jvm_class_index_null
 Real machine NULL index for classes.
const jvm_field_index jvm_field_index_bad
 Real machine NULL index for fields.
const jvm_field_lookup_index jvm_field_lookup_index_bad
 Real machine NULL index for field lookups.
const jvm_method_index jvm_method_index_bad
 Real machine BAD index for methods.
const jvm_native_method_ordinal jvm_native_method_ordinal_null
 Real machine NULL ordinal number for local native methods.
const jvm_native_method_ordinal jvm_native_method_ordinal_register
 Real machine reserved ordinal number for registering local native methods.
const jvm_native_method_ordinal jvm_native_method_ordinal_unregister
 Real machine reserved ordinal number for un-registering local native methods.
const jvm_unicode_string_index jvm_unicode_string_index_bad
 Real machine BAD index for Unicode.

Class file support

#define JVMCFG_BAD_INTERFACE   65535
 Bad interface slot, usually "not found".
typedef u2 jvm_constant_pool_index
 Constant pool indices all use this type.
typedef u2 jvm_interface_index
 Interface table indices all use this type.
const jvm_constant_pool_index jvm_constant_pool_index_null
 Real machine NULL constant_pool index.
const jvm_interface_index jvm_interface_index_bad
 Real machine BAD interface table index.

-Xbootclasspath token and its aliases

Command line options defining BOOTCLASSPATH instead of using the environment variable.

#define JVMCFG_BOOTCLASSPATH_ABBREV_PARM   "-Xbcp"
#define JVMCFG_BOOTCLASSPATH_FULL_PARM   "-Xbootclasspath"

Default environment variable definitions

#define JVMCFG_BOOTCLASSPATH_DEFAULT   tmparea_get()
 Default BOOTCLASSPATH to our temp area.
#define JVMCFG_CLASSPATH_DEFAULT   ((const rchar *) ".")
 Default CLASSPATH to current directory only.
#define JVMCFG_JAVA_HOME_DEFAULT   rnull
 Default JAVA_HOME .

-classpath token and its alises

Command line options defining CLASSPATH instead of using the environment variable.

#define JVMCFG_CLASSPATH_ABBREV_PARM   "-cp"
#define JVMCFG_CLASSPATH_FULL_PARM   "-classpath"

Individual command line tokens

#define JVMCFG_COMMAND_LINE_COPYRIGHT_PARM   "-copyright"
 Command line option to show program copyright message.
#define JVMCFG_COMMAND_LINE_HELP_PARM   "-help"
 Command line option to show command line help.
#define JVMCFG_COMMAND_LINE_LICENSE_PARM   "-license"
 Command line option to show software license.
#define JVMCFG_COMMAND_LINE_SHOW_PARM   "-show"
 Command line option to show program options.
#define JVMCFG_COMMAND_LINE_VERSION_PARM   "-version"
 Command line option to show program version number.
#define JVMCFG_JARFILE_STARTCLASS_PARM   "-jar"
 Command line declaring that startup class is in a JAR file and the name of that file.

-Xdebug_level token and its aliases

Command line options defining debug message level.

#define JVMCFG_DEBUGMSGLEVEL_ABBREV_PARM   "-Xdebug"
#define JVMCFG_DEBUGMSGLEVEL_FULL_PARM   "-Xdebug_level"
#define JVMCFG_DEBUGMSGLEVEL_MID_PARM   "-Xdebuglevel"

Environment variable names

Environment variables used by Java.

Each one of these may be overridden from the command line.

#define JVMCFG_ENVIRONMENT_VARIABLE_BOOTCLASSPATH   "BOOTCLASSPATH"
#define JVMCFG_ENVIRONMENT_VARIABLE_CLASSPATH   "CLASSPATH"
#define JVMCFG_ENVIRONMENT_VARIABLE_JAVA_HOME   "JAVA_HOME"

Exception handling support.

#define JVMCFG_EXCEPTION_DEFAULT_CONSTRUCTOR_DESCRIPTOR
 Constructor to use for basic exception handling.
#define JVMCFG_UNCAUGHT_EXCEPTION_METHOD   "uncaughtException"
 Uncaught exception method name.
#define JVMCFG_UNCAUGHT_EXCEPTION_PARMS
 Uncaught exception method parameter list.

OS File system conventions.

Conventions for OS file systems (see also classfile.h for CLASSFILE_EXTENSION_xxx definitions).

   Unix style:     /path/name1/name2/filename.extension
  
   Windows style:  c:\path\name1\name2\filename.extension
  
 * 


#define JVMCFG_EXTENSION_DELIMITER_CHAR   '.'
#define JVMCFG_EXTENSION_DELIMITER_STRING   "."
#define JVMCFG_PATHNAME_DELIMITER_CHAR   '/'
#define JVMCFG_PATHNAME_DELIMITER_STRING   "/"

Object finalization support.

#define JVMCFG_FINALIZE_OBJECT_METHOD   "finalize"
#define JVMCFG_FINALIZE_OBJECT_PARMS

Object table support

#define JVMCFG_FIRST_OBJECT   1
 First object slot to allocate.
#define JVMCFG_MAX_OBJECTS   1000
 Max number of object allocations.
#define JVMCFG_NULL_OBJECT   0
 Null object slot coincides w/hash 0.
typedef u2 jvm_access_flags
 Holds spec ACC_xxx bit masks.
typedef u1 jvm_basetype
 Holds object data type, such as I == Integer.
typedef ruint jvm_object_hash
 Object reference, corresponding to the JNI type jobject.
const jvm_object_hash jvm_object_hash_null
 Real machine NULL hash.

Thread table support.

JVM Thread model definitions.

Note:
Thread groups are supported by the class library.

The JVMCFG_NULL_THREAD is never used at run time.

The JVMCFG_SYSTEM_THREAD will never be used within the context of the JVM execution engine. Its purpose is ONLY for internal administration. THEREFORE: there will never be a java.lang.Thread object created for it!



#define JVMCFG_FIRST_THREAD   3
#define JVMCFG_GC_THREAD   2
#define JVMCFG_MAX_THREADS   1000
#define JVMCFG_NULL_THREAD   0
#define JVMCFG_SYSTEM_THREAD   1
#define JVMCFG_THREAD_NAME_GC   "gc"
#define JVMCFG_THREAD_NAME_SYSTEM   "system"
typedef rushort jvm_thread_index
const jvm_thread_index jvm_thread_index_null
 Real machine NULL thread index.

Native method support

#define JVMCFG_IGNORE_NATIVE_METHOD_CALLS   rtrue
 Ignore native method calls.
#define JVMCFG_REGISTER_NATIVES_METHOD   "registerNatives"
 Native method registration method name.
#define JVMCFG_REGISTER_NATIVES_PARMS
 Native method registration method descriptor.
#define JVMCFG_UNREGISTER_NATIVES_METHOD   "unregisterNatives"
 Native method unregistration method name.
#define JVMCFG_UNREGISTER_NATIVES_PARMS
 Native method unregistration method descriptor.

JAR file structural items

Todo:
Write and implement DOS/Windows version of these scripts. Perhaps a two- or three-line .BAT file is the thing to do?


#define JVMCFG_JARFILE_DATA_EXTRACT_SCRIPT   "chdir %s; %s/bin/jar -xf %s%c%s %s; chmod -R +w ."
#define JVMCFG_JARFILE_MANIFEST_EXTRACT_SCRIPT   "chdir %s; %s/bin/jar -xf %s; chmod -R +w ."
#define JVMCFG_JARFILE_MANIFEST_FILENAME   "META-INF/MANIFEST.MF"
#define JVMCFG_JARFILE_MANIFEST_LINE_MAX   72
#define JVMCFG_JARFILE_MANIFEST_MAIN_CLASS   "Main-Class:"

-Xjava_home token and its aliases

Command line options defining JAVA_HOME instead. of the environment variable

#define JVMCFG_JAVA_HOME_ABBREV_PARM   "-Xjh"
#define JVMCFG_JAVA_HOME_FULL_PARM   "-Xjava_home"
#define JVMCFG_JAVA_HOME_MID_PARM   "-Xjavahome"

main() method support

#define JVMCFG_MAIN_METHOD   "main"
 Startup class' main() method name.
#define JVMCFG_MAIN_PARM_ARGV_INDEX   0
 Startup class' main() method local variable index for args[].
#define JVMCFG_MAIN_PARMS
 Startup class' main() method parameter list.

Array dimension support.

#define JVMCFG_MAX_ARRAY_DIMS   CONSTANT_MAX_ARRAY_DIMS
 Spec-defined number of array dimensions.
typedef jubyte jvm_array_dim
 Array dimension type.

Stack size definitions

#define JVMCFG_MAX_SP   (JVMCFG_STACK_SIZE - sizeof(jint))
 Maximum stack pointer value.
#define JVMCFG_NULL_SP   0
 Empty stack pointer value.
#define JVMCFG_STACK_SIZE   (8 * 1024 * sizeof(jint))
 Arbitrary max stack size, in bytes.
typedef jushort jvm_sp
 Stack pointer type.

Arbitrary max buffer sizes

#define JVMCFG_PATH_MAX   1024
 Convenient size for any disk path.
#define JVMCFG_SCRIPT_MAX   1024
 Convenient size for a system(3) call.
#define JVMCFG_STDIO_BFR   1024
 Convenient size for any stdio msg.

Interval timer support.

#define JVMCFG_TIMESLICE_DEBUG_REPORT_MIN_SECONDS   0
 Minimum number of seconds before timeslice_tick() starts printing a short message at every timer tick.
#define JVMCFG_TIMESLICE_PERIOD_ENABLE   rfalse
 JVM interval timer enable.
#define JVMCFG_TIMESLICE_PERIOD_MICROSECONDS   1000
 JVM interval timer period (microseconds).
#define JVMCFG_TIMESLICE_PERIOD_SECONDS   0
 JVM interval timer period (seconds).

Temporary disk area script support

Shell scripts to support selected temporary area operations.

Notice that mkdir(2) is used for creating this directory, but that a shell script fragment JVMCFG_TMPAREA_REMOVE_SCRIPT is used for removing it.

#define JVMCFG_TMPAREA_DEFAULT   "/tmp"
 Temporary area default when no TMPDIR environment variable.
#define JVMCFG_TMPAREA_REMOVE_SCRIPT   "rm -rf %s"
 Remove temporary directory.

Program counter definitions

typedef juint jvm_pc_offset
 Program counter offset into code area of a method.
jvm_pc_offset jvm_pc_offset_bad
 Invalid program counter offset.

Initialization roll call globals

Each of these symbols tracks a phase of jvm_init() in case there is an error at some point and jvm_shutdown() needs to be called. When that happens, only those initializion phases that were complete are reversed and cleaned up.

rboolean jvm_argv_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_class_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_classpath_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_heap_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_model_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_object_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_thread_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_timeslice_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.
rboolean jvm_tmparea_initialized
 Permit boolean "false" manifest constant for initializing static and global storage.

Defines

#define JVMCFG_MANUAL_STRING_DESCRIPTOR   BASETYPE_STRING_L JVMCLASS_JAVA_LANG_STRING BASETYPE_STRING_L_TERM
 Descriptor for strings.

Functions

 ARCH_COPYRIGHT_APACHE (jvmcfg, h,"$URL: https://svn.apache.org/path/name/jvmcfg.h $ $Id: jvmcfg.h 0 09/28/2005 dlydick $")


Define Documentation

#define JVMCFG_PATHNAME_DELIMITER_CHAR   '/'
 

Definition at line 134 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_PATHNAME_DELIMITER_STRING   "/"
 

Definition at line 135 of file jvmcfg.h.

#define JVMCFG_EXTENSION_DELIMITER_CHAR   '.'
 

Definition at line 137 of file jvmcfg.h.

#define JVMCFG_EXTENSION_DELIMITER_STRING   "."
 

Definition at line 138 of file jvmcfg.h.

#define JVMCFG_MANUAL_STRING_DESCRIPTOR   BASETYPE_STRING_L JVMCLASS_JAVA_LANG_STRING BASETYPE_STRING_L_TERM
 

Descriptor for strings.

Use this descriptor for manually loading startup class java.lang.String objects.

Resolves to "Ljava/lang/String;"

Definition at line 154 of file jvmcfg.h.

#define JVMCFG_JARFILE_STARTCLASS_PARM   "-jar"
 

Command line declaring that startup class is in a JAR file and the name of that file.

Definition at line 170 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_COMMAND_LINE_HELP_PARM   "-help"
 

Command line option to show command line help.

Definition at line 177 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_COMMAND_LINE_LICENSE_PARM   "-license"
 

Command line option to show software license.

Definition at line 184 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_COMMAND_LINE_VERSION_PARM   "-version"
 

Command line option to show program version number.

Definition at line 191 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_COMMAND_LINE_COPYRIGHT_PARM   "-copyright"
 

Command line option to show program copyright message.

Definition at line 198 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_COMMAND_LINE_SHOW_PARM   "-show"
 

Command line option to show program options.

Definition at line 205 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_ENVIRONMENT_VARIABLE_JAVA_HOME   "JAVA_HOME"
 

Definition at line 220 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_ENVIRONMENT_VARIABLE_CLASSPATH   "CLASSPATH"
 

Definition at line 221 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_ENVIRONMENT_VARIABLE_BOOTCLASSPATH   "BOOTCLASSPATH"
 

Definition at line 222 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_JAVA_HOME_DEFAULT   rnull
 

Default JAVA_HOME .

Set the default value of the JAVA_HOME environment variable to an rnull pointer.

Definition at line 249 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_CLASSPATH_DEFAULT   ((const rchar *) ".")
 

Default CLASSPATH to current directory only.

Definition at line 256 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_BOOTCLASSPATH_DEFAULT   tmparea_get()
 

Default BOOTCLASSPATH to our temp area.

This area starts out empty, meaning that nothing will be found there to boot from, but a default of some sort is needed. May be overridden by -Xbootclasspath.

Definition at line 267 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_JAVA_HOME_ABBREV_PARM   "-Xjh"
 

Definition at line 282 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_JAVA_HOME_MID_PARM   "-Xjavahome"
 

Definition at line 283 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_JAVA_HOME_FULL_PARM   "-Xjava_home"
 

Definition at line 284 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_CLASSPATH_ABBREV_PARM   "-cp"
 

Definition at line 299 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_CLASSPATH_FULL_PARM   "-classpath"
 

Definition at line 300 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_BOOTCLASSPATH_ABBREV_PARM   "-Xbcp"
 

Definition at line 315 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_BOOTCLASSPATH_FULL_PARM   "-Xbootclasspath"
 

Definition at line 316 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_DEBUGMSGLEVEL_ABBREV_PARM   "-Xdebug"
 

Definition at line 330 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_DEBUGMSGLEVEL_MID_PARM   "-Xdebuglevel"
 

Definition at line 331 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_DEBUGMSGLEVEL_FULL_PARM   "-Xdebug_level"
 

Definition at line 332 of file jvmcfg.h.

Referenced by argv_init().

#define JVMCFG_REGISTER_NATIVES_METHOD   "registerNatives"
 

Native method registration method name.

Definition at line 348 of file jvmcfg.h.

#define JVMCFG_REGISTER_NATIVES_PARMS
 

Value:

Native method registration method descriptor.

Resolves to "()V"

Definition at line 356 of file jvmcfg.h.

#define JVMCFG_UNREGISTER_NATIVES_METHOD   "unregisterNatives"
 

Native method unregistration method name.

Definition at line 366 of file jvmcfg.h.

#define JVMCFG_UNREGISTER_NATIVES_PARMS
 

Value:

Native method unregistration method descriptor.

Resolves to "()V"

Definition at line 374 of file jvmcfg.h.

#define JVMCFG_IGNORE_NATIVE_METHOD_CALLS   rtrue
 

Ignore native method calls.

If ignored, then return the same default value as is default for field initializations (namely, zero, jfalse, jnull, etc.) If not ignored, then attempt to run them. In both cases, produce a return value as appropriate.

Definition at line 389 of file jvmcfg.h.

#define JVMCFG_MAIN_METHOD   "main"
 

Startup class' main() method name.

Definition at line 405 of file jvmcfg.h.

#define JVMCFG_MAIN_PARMS
 

Value:

Startup class' main() method parameter list.

Resolves to "([Ljava/lang/String;)V"

Definition at line 413 of file jvmcfg.h.

#define JVMCFG_MAIN_PARM_ARGV_INDEX   0
 

Startup class' main() method local variable index for args[].

Definition at line 426 of file jvmcfg.h.

#define JVMCFG_EXCEPTION_DEFAULT_CONSTRUCTOR_DESCRIPTOR
 

Value:

Constructor to use for basic exception handling.

Definition at line 442 of file jvmcfg.h.

#define JVMCFG_UNCAUGHT_EXCEPTION_METHOD   "uncaughtException"
 

Uncaught exception method name.

Definition at line 452 of file jvmcfg.h.

Referenced by opcode_run().

#define JVMCFG_UNCAUGHT_EXCEPTION_PARMS
 

Value:

Uncaught exception method parameter list.

Resolves to "([Ljava/lang/Thread;[Ljava/lang/Throwable;)V"

Definition at line 460 of file jvmcfg.h.

Referenced by opcode_run().

#define JVMCFG_FINALIZE_OBJECT_METHOD   "finalize"
 

Object finalize method name.

Definition at line 485 of file jvmcfg.h.

#define JVMCFG_FINALIZE_OBJECT_PARMS
 

Value:

Object finalize method descriptor.

Resolves to "()V"

Definition at line 493 of file jvmcfg.h.

#define JVMCFG_MAX_ARRAY_DIMS   CONSTANT_MAX_ARRAY_DIMS
 

Spec-defined number of array dimensions.

Definition at line 511 of file jvmcfg.h.

#define JVMCFG_TIMESLICE_PERIOD_ENABLE   rfalse
 

JVM interval timer enable.

When rtrue, the timer runs normally. Set it rfalse typically only for debugging the JVM outer loop logic or for debugging the interval timer logic itself.

Warning:
See warning about use of timeslice_tick() and high-speed interval timing.
Todo:
Make sure to enable the time slicer for normal JVM operation. It may be handy to disable it for debugging, but no threading will occur in the JVM outer loop until it is enabled!

Definition at line 545 of file jvmcfg.h.

Referenced by timeslice_run().

#define JVMCFG_TIMESLICE_PERIOD_SECONDS   0
 

JVM interval timer period (seconds).

This value is typically zero (0) for normal operation. Set it to any convenient number of seconds for debugging the JVM outer loop.

Setting both timer values to zero will disable the interval timer completely.

Warning:
See warning about use of timeslice_tick() and high-speed interval timing.

Definition at line 562 of file jvmcfg.h.

Referenced by timeslice_run().

#define JVMCFG_TIMESLICE_PERIOD_MICROSECONDS   1000
 

JVM interval timer period (microseconds).

For correct operation of the JVM interval timer at 1 kHz, set this value to one thousand (1000). This will guarantee that timer periods such as sleep() and wait() will work according to their definitions. This value may be set to some other value for debug purposes.

Setting both timer values to zero will disable the interval timer completely.

Warning:
See warning about use of timeslice_tick() and high-speed interval timing.

Definition at line 583 of file jvmcfg.h.

Referenced by timeslice_run().

#define JVMCFG_TIMESLICE_DEBUG_REPORT_MIN_SECONDS   0
 

Minimum number of seconds before timeslice_tick() starts printing a short message at every timer tick.

Print "timeslice_tick: tick" at every interval timer event. If set to a non-zero value, typically for debug purposes, timeslice_tick() will start reporting timer events through a standard error message via sysDbgMsg() after the defined number of seconds. It is effectively a delay value to enable this message, but only after a certain run time has passed. When using this facility, absolutely sure that the value of JVMCFG_TIMESLICE_PERIOD_SECONDS is large enough that these reports do not overwhelm the standard error resource and prohibit productive work.

A value of zero (0) disables this facility.

Definition at line 607 of file jvmcfg.h.

Referenced by timeslice_tick().

#define JVMCFG_MAX_THREADS   1000
 

Definition at line 632 of file jvmcfg.h.

Referenced by thread_init(), thread_state_get_name(), and threadutil_update_sleeptime_interval().

#define JVMCFG_NULL_THREAD   0
 

Definition at line 634 of file jvmcfg.h.

#define JVMCFG_SYSTEM_THREAD   1
 

Definition at line 636 of file jvmcfg.h.

Referenced by thread_init().

#define JVMCFG_GC_THREAD   2
 

Definition at line 637 of file jvmcfg.h.

Referenced by thread_init().

#define JVMCFG_FIRST_THREAD   3
 

Definition at line 638 of file jvmcfg.h.

Referenced by thread_state_get_name().

#define JVMCFG_THREAD_NAME_SYSTEM   "system"
 

Definition at line 653 of file jvmcfg.h.

#define JVMCFG_THREAD_NAME_GC   "gc"
 

Definition at line 654 of file jvmcfg.h.

#define JVMCFG_BAD_INTERFACE   65535
 

Bad interface slot, usually "not found".

Definition at line 703 of file jvmcfg.h.

#define JVMCFG_MAX_CLASSES   200
 

Max number of class allocations.

Definition at line 719 of file jvmcfg.h.

Referenced by class_allocate_slot(), and gc_run_stub().

#define JVMCFG_NULL_CLASS   0
 

Null class slot coincides with hash 0.

Definition at line 727 of file jvmcfg.h.

#define JVMCFG_FIRST_CLASS   1
 

First object slot to allocate.

Definition at line 734 of file jvmcfg.h.

Referenced by class_allocate_slot().

#define JVMCFG_BAD_METHOD   65535
 

Bad method slot, usually "not found".

Definition at line 763 of file jvmcfg.h.

#define JVMCFG_BAD_FIELD   65535
 

Bad field slot, usually "not found".

Definition at line 782 of file jvmcfg.h.

#define JVMCFG_BAD_FIELD_LOOKUP   65535
 

Bad lookup slot, usually "not found".

Definition at line 800 of file jvmcfg.h.

#define JVMCFG_JLOBJECT_NMO_NULL   0
 

Null local method slot, usually "not found".

See also parallel definition JLOBJECT_NMO_NULL

Definition at line 839 of file jvmcfg.h.

Referenced by native_run_local_return_jdouble(), native_run_local_return_jfloat(), native_run_local_return_jint(), native_run_local_return_jlong(), native_run_local_return_jobject(), and native_verify_ordinal_definition().

#define JVMCFG_JLOBJECT_NMO_REGISTER   1
 

Reserved local method slot for the registration of local native methods.

See also parallel definition JLOBJECT_NMO_REGISTER

Definition at line 857 of file jvmcfg.h.

Referenced by native_verify_ordinal_definition().

#define JVMCFG_JLOBJECT_NMO_UNREGISTER   2
 

Reserved local method slot for the un-registration of local native methods.

See also parallel definition JLOBJECT_NMO_UNREGISTER

Definition at line 875 of file jvmcfg.h.

Referenced by native_verify_ordinal_definition().

#define JVMCFG_BAD_ATTRIBUTE   65535
 

Bad attribute slot,usually "not found".

Definition at line 881 of file jvmcfg.h.

#define JVMCFG_NATIVE_METHOD_ATTRIBUTE   65534
 

Native method slot,no code attribute.

Definition at line 887 of file jvmcfg.h.

#define JVMCFG_BAD_UNICODE_STRING   65535
 

Bad unicode string slot, usually "not found".

Definition at line 911 of file jvmcfg.h.

#define JVMCFG_MAX_OBJECTS   1000
 

Max number of object allocations.

Definition at line 927 of file jvmcfg.h.

Referenced by gc_run_stub(), object_allocate_slot(), and object_instance_finalize().

#define JVMCFG_NULL_OBJECT   0
 

Null object slot coincides w/hash 0.

Definition at line 934 of file jvmcfg.h.

#define JVMCFG_FIRST_OBJECT   1
 

First object slot to allocate.

Definition at line 941 of file jvmcfg.h.

Referenced by object_allocate_slot().

#define JVMCFG_STACK_SIZE   (8 * 1024 * sizeof(jint))
 

Arbitrary max stack size, in bytes.

This value must be in increments of 4 bytes!

Warning:
This value must be in increments of 4 bytes! (Get it?)

Definition at line 989 of file jvmcfg.h.

#define JVMCFG_MAX_SP   (JVMCFG_STACK_SIZE - sizeof(jint))
 

Maximum stack pointer value.

Definition at line 995 of file jvmcfg.h.

#define JVMCFG_NULL_SP   0
 

Empty stack pointer value.

Definition at line 1001 of file jvmcfg.h.

Referenced by thread_init().

#define DMLOFF   DML0
 

Convenient alias for DML0.

Definition at line 1072 of file jvmcfg.h.

Referenced by argv_init().

#define DMLMIN   DML1
 

Convenient alias for DML1.

Definition at line 1074 of file jvmcfg.h.

Referenced by argv_init().

#define DMLNORM   DML5
 

Convenient alias for DML5.

Definition at line 1076 of file jvmcfg.h.

Referenced by cfattrib_loadattribute(), cfmsgs_typemsg(), classfile_loadclassdata(), and linkage_resolve_class().

#define DMLMAX   DML10
 

Convenient alias for DML10.

Definition at line 1078 of file jvmcfg.h.

Referenced by argv_init().

#define DMLDEFAULT   DMLNORM
 

Initial debug level, may be changed by command line parameter.

Definition at line 1082 of file jvmcfg.h.

#define JVMCFG_STDIO_BFR   1024
 

Convenient size for any stdio msg.

Definition at line 1096 of file jvmcfg.h.

Referenced by cfmsgs_typemsg(), jvmutil_print_errtype_stack(), manifest_get_main(), sysDbgMsg(), sysErrMsg(), and sysErrMsgBfrFormat().

#define JVMCFG_PATH_MAX   1024
 

Convenient size for any disk path.

Definition at line 1097 of file jvmcfg.h.

#define JVMCFG_SCRIPT_MAX   1024
 

Convenient size for a system(3) call.

Definition at line 1098 of file jvmcfg.h.

#define JVMCFG_DEBUG_MESSAGE_ENABLE   rtrue
 

Enable stderr debug messages using sysDbgMsg() format messages.

When disabled, no debug message will display. The debug levels, including the default level DMLDEFAULT, are defined in util.h.

Definition at line 1126 of file jvmcfg.h.

Referenced by sysDbgMsg().

#define printf   _printfLocal
 

Definition at line 1131 of file jvmcfg.h.

#define fprintf   _fprintfLocal
 

Definition at line 1132 of file jvmcfg.h.

#define sprintf   _sprintfLocal
 

Definition at line 1133 of file jvmcfg.h.

Referenced by sysDbgMsg(), sysErrMsg(), and sysErrMsgBfrFormat().

#define JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER
 

When desired, persuade Eclipse to flush its stdio buffers better by invoking sleep(3) for <= 1 second (with arg of '1').

Definition at line 1145 of file jvmcfg.h.

Referenced by sysDbgMsg(), and sysErrMsg().

#define JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER_EXIT   sleep(1)
 

Same thing as JVMCFG_DEBUG_ECLIPSE_FLUSH_STDIO_BETTER, but at end of JVM run before exit, try to persuade Eclipse to flush all standard I/O buffers before quitting JVM.

Definition at line 1155 of file jvmcfg.h.

#define JVMCFG_TMPAREA_DEFAULT   "/tmp"
 

Temporary area default when no TMPDIR environment variable.

Definition at line 1200 of file jvmcfg.h.

#define JVMCFG_TMPAREA_REMOVE_SCRIPT   "rm -rf %s"
 

Remove temporary directory.

Definition at line 1205 of file jvmcfg.h.

#define JVMCFG_JARFILE_DATA_EXTRACT_SCRIPT   "chdir %s; %s/bin/jar -xf %s%c%s %s; chmod -R +w ."
 

Definition at line 1227 of file jvmcfg.h.

#define JVMCFG_JARFILE_MANIFEST_EXTRACT_SCRIPT   "chdir %s; %s/bin/jar -xf %s; chmod -R +w ."
 

Definition at line 1230 of file jvmcfg.h.

#define JVMCFG_JARFILE_MANIFEST_FILENAME   "META-INF/MANIFEST.MF"
 

Definition at line 1235 of file jvmcfg.h.

#define JVMCFG_JARFILE_MANIFEST_MAIN_CLASS   "Main-Class:"
 

Definition at line 1237 of file jvmcfg.h.

Referenced by manifest_get_main().

#define JVMCFG_JARFILE_MANIFEST_LINE_MAX   72
 

Definition at line 1239 of file jvmcfg.h.


Typedef Documentation

typedef jubyte jvm_array_dim
 

Array dimension type.

Definition at line 516 of file jvmcfg.h.

typedef rushort jvm_thread_index
 

Definition at line 648 of file jvmcfg.h.

typedef u2 jvm_constant_pool_index
 

Constant pool indices all use this type.

Definition at line 669 of file jvmcfg.h.

typedef u2 jvm_interface_index
 

Interface table indices all use this type.

Definition at line 691 of file jvmcfg.h.

typedef rushort jvm_class_index
 

Class indices all use this type.

Definition at line 740 of file jvmcfg.h.

typedef u2 jvm_method_index
 

Method table indices all use this type.

Definition at line 751 of file jvmcfg.h.

typedef u2 jvm_field_index
 

Field table indices all use this type.

Definition at line 770 of file jvmcfg.h.

typedef u2 jvm_field_lookup_index
 

Field table lookups all use this type.

Definition at line 788 of file jvmcfg.h.

typedef u2 jvm_attribute_index
 

Attribute table indices all use this type.

Definition at line 806 of file jvmcfg.h.

typedef unsigned int jvm_native_method_ordinal
 

Ordinal number for local native method.

Definition at line 824 of file jvmcfg.h.

typedef u2 jvm_utf_string_index
 

UTF8 string table indices all use this type.

Definition at line 893 of file jvmcfg.h.

typedef u2 jvm_unicode_string_index
 

Unicode string table indices all use this type.

Definition at line 899 of file jvmcfg.h.

typedef ruint jvm_object_hash
 

Object reference, corresponding to the JNI type jobject.

See parallel definition for use in public interface in jlObject.h

Definition at line 951 of file jvmcfg.h.

typedef u2 jvm_access_flags
 

Holds spec ACC_xxx bit masks.

Definition at line 963 of file jvmcfg.h.

typedef u1 jvm_basetype
 

Holds object data type, such as I == Integer.

Definition at line 969 of file jvmcfg.h.

typedef jushort jvm_sp
 

Stack pointer type.

Definition at line 1007 of file jvmcfg.h.

typedef juint jvm_pc_offset
 

Program counter offset into code area of a method.

This data type is used in jvm_pc.

Definition at line 1025 of file jvmcfg.h.


Enumeration Type Documentation

enum jvm_debug_level_enum
 

Enumerator:
DML0  Only VITAL debug messages.
DML1  Minimum amount of debug messages.
DML2 
DML3 
DML4 
DML5  Average amount of debug messages.
DML6 
DML7 
DML8 
DML9 
DML10  Absolutely ALL debug messages.

Definition at line 1056 of file jvmcfg.h.


Function Documentation

ARCH_COPYRIGHT_APACHE jvmcfg  ,
,
"$URL: https://svn.apache.org/path/name/jvmcfg.h $ $Id: jvmcfg.h 0 09/28/2005 dlydick $" 
 


Variable Documentation

const jvm_thread_index jvm_thread_index_null
 

Real machine NULL thread index.

Definition at line 49 of file jvmcfg.c.

Referenced by class_load_from_prchar(), exit_exception_setup(), object_new_setup(), object_run_method(), opcode_load_run_throwable(), thread_init(), and threadutil_update_sleeptime_interval().

const jvm_constant_pool_index jvm_constant_pool_index_null
 

Real machine NULL constant_pool index.

Definition at line 52 of file jvmcfg.c.

const jvm_interface_index jvm_interface_index_bad
 

Real machine BAD interface table index.

Definition at line 57 of file jvmcfg.c.

const jvm_class_index jvm_class_index_null
 

Real machine NULL index for classes.

Definition at line 60 of file jvmcfg.c.

Referenced by attribute_find_in_class_by_cp_entry(), attribute_find_in_class_by_enum(), attribute_find_in_field_by_cp_entry(), attribute_find_in_field_by_enum(), attribute_find_in_method_by_cp_entry(), attribute_find_in_method_by_enum(), cfmsgs_typemsg(), class_get_object_instance_field_data(), class_load_primative(), class_static_new(), class_static_setup(), classfile_loadclassdata(), field_find_by_cp_entry(), gc_run_stub(), jlClass_isArray(), linkage_resolve_class(), method_find_by_cp_entry(), object_new_setup(), opcode_load_run_throwable(), opcode_run(), and thread_init().

const jvm_method_index jvm_method_index_bad
 

Real machine BAD index for methods.

Definition at line 66 of file jvmcfg.c.

Referenced by class_load_from_prchar(), classfile_loadclassdata(), linkage_resolve_class(), method_find_by_cp_entry(), object_run_method(), opcode_run(), and thread_init().

const jvm_field_index jvm_field_index_bad
 

Real machine NULL index for fields.

Definition at line 69 of file jvmcfg.c.

Referenced by classfile_loadclassdata(), field_find_by_cp_entry(), field_index_get_class_static_lookup(), field_index_get_class_static_pjvalue(), field_index_get_object_instance_lookup(), field_index_is_class_static(), field_index_is_object_instance(), field_index_put_class_static_pjvalue(), field_index_put_object_instance_pjvalue(), and linkage_resolve_class().

const jvm_field_lookup_index jvm_field_lookup_index_bad
 

Real machine NULL index for field lookups.

Definition at line 72 of file jvmcfg.c.

Referenced by field_index_get_class_static_lookup(), and linkage_resolve_class().

const jvm_attribute_index jvm_attribute_index_bad
 

Real machine NULL index for attributes.

Definition at line 78 of file jvmcfg.c.

Referenced by attribute_enum_common_find(), attribute_find_in_class_by_cp_entry(), attribute_find_in_class_by_enum(), attribute_find_in_field_by_cp_entry(), attribute_find_in_field_by_enum(), attribute_find_in_method_by_cp_entry(), attribute_find_in_method_by_enum(), attribute_name_common_find(), class_load_from_prchar(), classfile_loadclassdata(), jvmutil_print_stack_common(), linkage_resolve_class(), object_run_method(), opcode_run(), and thread_init().

const jvm_attribute_index jvm_attribute_index_native
 

Real machine marker for native method.

Definition at line 83 of file jvmcfg.c.

Referenced by linkage_resolve_class(), object_run_method(), and opcode_run().

const jvm_native_method_ordinal jvm_native_method_ordinal_null
 

Real machine NULL ordinal number for local native methods.

Definition at line 89 of file jvmcfg.c.

Referenced by classfile_loadclassdata().

const jvm_native_method_ordinal jvm_native_method_ordinal_register
 

Real machine reserved ordinal number for registering local native methods.

Definition at line 95 of file jvmcfg.c.

const jvm_native_method_ordinal jvm_native_method_ordinal_unregister
 

Real machine reserved ordinal number for un-registering local native methods.

Definition at line 101 of file jvmcfg.c.

const jvm_unicode_string_index jvm_unicode_string_index_bad
 

Real machine BAD index for Unicode.

Definition at line 108 of file jvmcfg.c.

const jvm_object_hash jvm_object_hash_null
 

Real machine NULL hash.

Definition at line 112 of file jvmcfg.c.

Referenced by class_get_static_field_lookups(), class_static_setup(), gc_run_stub(), jlObject_waittimed(), jlString_intern(), jlThread_interrupted(), object_init(), object_instance_finalize(), object_new_setup(), objectutil_synchronize(), opcode_load_run_throwable(), opcode_run(), thread_init(), and thread_new_common().

jvm_pc_offset jvm_pc_offset_bad
 

Invalid program counter offset.

Definition at line 105 of file jvmcfg.c.

Referenced by thread_init().

rboolean jvm_timeslice_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 756 of file jvm.c.

Referenced by timeslice_init(), and timeslice_shutdown().

rboolean jvm_thread_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 771 of file jvm.c.

Referenced by thread_init().

rboolean jvm_class_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 761 of file jvm.c.

rboolean jvm_object_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 766 of file jvm.c.

Referenced by object_init().

rboolean jvm_argv_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 776 of file jvm.c.

Referenced by argv_init().

rboolean jvm_classpath_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 781 of file jvm.c.

rboolean jvm_tmparea_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 786 of file jvm.c.

rboolean jvm_heap_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 796 of file jvm.c.

Referenced by heap_init_bimodal(), and heap_init_simple().

rboolean jvm_model_initialized
 

Permit boolean "false" manifest constant for initializing static and global storage.

Definition at line 791 of file jvm.c.


Generated on Fri Sep 30 19:00:23 2005 by  doxygen 1.4.4