< prev index next >

docs/DEVELOPER_README

Print this page
rev 1905 : 8162955: Activate anonymous class loading for small sources
Reviewed-by: sundar


 283 When running with the profile callsite options (-pcs), Nashorn will
 284 dump profiling data for all callsites to stderr as a shutdown hook. To
 285 instead redirect this to a file, specify the path to the file using
 286 this system property.
 287 
 288 
 289 SYSTEM_PROPERTY: -Dnashorn.regexp.impl=[jdk|joni]
 290 
 291 This property defines the regular expression engine to be used by
 292 Nashorn. Set this flag to "jdk" to get an implementation based on the
 293 JDK's java.util.regex package. Set this property to "joni" to install
 294 an implementation based on Joni, the regular expression engine used by
 295 the JRuby project. The default value for this flag is "joni"
 296 
 297 SYSTEM PROPERTY: -Dnashorn.runtime.event.queue.size=<value>
 298 
 299 Nashorn provides a fixed sized runtime event queue for debugging purposes.
 300 See -Dnashorn.debug for methods to access the event queue.
 301 The default value is 1024.
 302 










 303 ===============
 304 2. The loggers.
 305 ===============
 306 
 307 It is very simple to create your own logger. Use the DebugLogger class
 308 and give the subsystem name as a constructor argument.
 309 
 310 The Nashorn loggers can be used to print per-module or per-subsystem
 311 debug information with different levels of verbosity. The loggers for
 312 a given subsystem are available are enabled by using
 313 
 314 --log=<systemname>[:<level>]
 315 
 316 on the command line.
 317 
 318 Here <systemname> identifies the name of the subsystem to be logged
 319 and the optional colon and level argument is a standard
 320 java.util.logging.Level name (severe, warning, info, config, fine,
 321 finer, finest). If the level is left out for a particular subsystem,
 322 it defaults to "info". Any log message logged as the level or a level




 283 When running with the profile callsite options (-pcs), Nashorn will
 284 dump profiling data for all callsites to stderr as a shutdown hook. To
 285 instead redirect this to a file, specify the path to the file using
 286 this system property.
 287 
 288 
 289 SYSTEM_PROPERTY: -Dnashorn.regexp.impl=[jdk|joni]
 290 
 291 This property defines the regular expression engine to be used by
 292 Nashorn. Set this flag to "jdk" to get an implementation based on the
 293 JDK's java.util.regex package. Set this property to "joni" to install
 294 an implementation based on Joni, the regular expression engine used by
 295 the JRuby project. The default value for this flag is "joni"
 296 
 297 SYSTEM PROPERTY: -Dnashorn.runtime.event.queue.size=<value>
 298 
 299 Nashorn provides a fixed sized runtime event queue for debugging purposes.
 300 See -Dnashorn.debug for methods to access the event queue.
 301 The default value is 1024.
 302 
 303 SYSTEM PROPERTY: -Dnashorn.anonymous.classes.threshold=<value>
 304 
 305 Nashorn can use anonymous classes for loading compiled scripts, depending
 306 on the --anonymous-classes=[auto|true|false] option. Anonymous classes load
 307 faster, but the loaded classes get less optimization applied to them and
 308 therefore usually run slower. In the default "auto" setting, scripts are
 309 loaded as anonymous classes if the script size does not exceed 512 bytes.
 310 The above system property allows to set this threshold to a user defined
 311 value.
 312 
 313 ===============
 314 2. The loggers.
 315 ===============
 316 
 317 It is very simple to create your own logger. Use the DebugLogger class
 318 and give the subsystem name as a constructor argument.
 319 
 320 The Nashorn loggers can be used to print per-module or per-subsystem
 321 debug information with different levels of verbosity. The loggers for
 322 a given subsystem are available are enabled by using
 323 
 324 --log=<systemname>[:<level>]
 325 
 326 on the command line.
 327 
 328 Here <systemname> identifies the name of the subsystem to be logged
 329 and the optional colon and level argument is a standard
 330 java.util.logging.Level name (severe, warning, info, config, fine,
 331 finer, finest). If the level is left out for a particular subsystem,
 332 it defaults to "info". Any log message logged as the level or a level


< prev index next >