NumBlocks Usage

To control the NumBlocks tool, a variety of arguments can be provided The arguments can be provided directly to numblocks, or using a script file.

The syntax is as follows:

numblocks [-help] [-Xhelp] [-Xdoc] [-showSettings] [-version]
          [-all] [-classpath <path>] [-Xbootclasspath <path>]
          [-smart] [-numThreads <n>] [-blockSize <n>] 
          class1{"["<len>"]"} [... classn{"["<len>"]"}]

General

These are general options providing information about numblocks itself or enabling the use of script files that specify further options

-help

Display the usage of the NumBlocks tool and a short description of all possible standard command line options

-Xhelp

Display the usage of the NumBlocks tool and a short description of all possible standard and extended command line options. The extended command line options are not needed for normal control of the numblocks command. They provide means to configure the tools and options to be used and provide tools required internally for development of the JamaicaVM

-Xdoc

Setting this option causes the creation of docbook documentation file for this command.

-showSettings

The currently used options of the JamaicaVM Builder are written to stdout in property file format. To make these the default settings, copy these options into your jamaica.conf file.

-version

Prints the version of the Jamaica Builder Tool and exits.

Classes, files, and paths

These options allow to specify classes and paths to be used by numblocks.

-all

If this option is set, the number of blocks required for the allocation of objects of all classes in this application will be displayed.

-classpath <path>

Specify the paths that are to be used to search for class files. A list of paths seperated by the path separator char (":" on Unix systems) can be specified. This list will be traversed from left to right when the builder tries to load a class.

-Xbootclasspath <path>

Specifies default path used for loading system classes

Smart linking and compaction

Smart linking and compaction are techniques to reduce the code size and heap memory required by the generated application. These techniques are controlled by the following options.

-smart

This Builder option has an influence on the number of blocks required for some objects. Consequently, it must be provided to numblocks for all applications that are built using -smart.

Memory and threads settings

-numThreads <n>

This Builder option has an influence on the number of blocks required for some objects. Consequently, it must be provided to numblocks for all applications that are built with a specified number of threads.

-blockSize <n>

Jamaica looks at the heap as a large array of single memory units, so called blocks. All allocated object are constructed out of these blocks. The size to be used for these blocks can be specified using this option.

Applications that generate a large number of very small or very large Java objects or applications for which a particular object size strongly dominates can profit from selecting the most suitable block size. This has an effect on the memory requirements of the application and on its runtime performance.

The size is specified in number for bytes per block. It must be at least 16 (when -smart is used) or 20 (otherwise). The maxium size allowed is 128. 32 Bytes a good standard block size for most applications. For alignment reasons, a power of two should in most cases be preferred.