1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
240 static SystemProperty *_sun_boot_library_path;
241 static SystemProperty *_java_library_path;
242 static SystemProperty *_java_home;
243 static SystemProperty *_java_class_path;
244 static SystemProperty *_sun_boot_class_path;
245
246 // Meta-index for knowing what packages are in the boot class path
247 static char* _meta_index_path;
248 static char* _meta_index_dir;
249
250 // java.vendor.url.bug, bug reporting URL for fatal errors.
251 static const char* _java_vendor_url_bug;
252
253 // sun.java.launcher, private property to provide information about
254 // java/gamma launcher
255 static const char* _sun_java_launcher;
256
257 // sun.java.launcher.pid, private property
258 static int _sun_java_launcher_pid;
259
260 // Option flags
261 static bool _has_profile;
262 static bool _has_alloc_profile;
263 static const char* _gc_log_filename;
264 static uintx _min_heap_size;
265
266 // -Xrun arguments
267 static AgentLibraryList _libraryList;
268 static void add_init_library(const char* name, char* options)
269 { _libraryList.add(new AgentLibrary(name, options, false, NULL)); }
270
271 // -agentlib and -agentpath arguments
272 static AgentLibraryList _agentList;
273 static void add_init_agent(const char* name, char* options, bool absolute_path)
274 { _agentList.add(new AgentLibrary(name, options, absolute_path, NULL)); }
275
276 // Late-binding agents not started via arguments
277 static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib)
278 { _agentList.add(new AgentLibrary(name, options, absolute_path, os_lib)); }
279
427 // print jvm_flags, jvm_args and java_command
428 static void print_on(outputStream* st);
429
430 // convenient methods to obtain / print jvm_flags and jvm_args
431 static const char* jvm_flags() { return build_resource_string(_jvm_flags_array, _num_jvm_flags); }
432 static const char* jvm_args() { return build_resource_string(_jvm_args_array, _num_jvm_args); }
433 static void print_jvm_flags_on(outputStream* st);
434 static void print_jvm_args_on(outputStream* st);
435
436 // -Dkey=value flags
437 static SystemProperty* system_properties() { return _system_properties; }
438 static const char* get_property(const char* key);
439
440 // -Djava.vendor.url.bug
441 static const char* java_vendor_url_bug() { return _java_vendor_url_bug; }
442
443 // -Dsun.java.launcher
444 static const char* sun_java_launcher() { return _sun_java_launcher; }
445 // Was VM created by a Java launcher?
446 static bool created_by_java_launcher();
447 // -Dsun.java.launcher.pid
448 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; }
449
450 // -Xloggc:<file>, if not specified will be NULL
451 static const char* gc_log_filename() { return _gc_log_filename; }
452
453 // -Xprof/-Xaprof
454 static bool has_profile() { return _has_profile; }
455 static bool has_alloc_profile() { return _has_alloc_profile; }
456
457 // -Xms, -Xmx
458 static uintx min_heap_size() { return _min_heap_size; }
459 static void set_min_heap_size(uintx v) { _min_heap_size = v; }
460
461 // -Xrun
462 static AgentLibrary* libraries() { return _libraryList.first(); }
463 static bool init_libraries_at_startup() { return !_libraryList.is_empty(); }
464 static void convert_library_to_agent(AgentLibrary* lib)
465 { _libraryList.remove(lib);
466 _agentList.add(lib); }
|
1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
240 static SystemProperty *_sun_boot_library_path;
241 static SystemProperty *_java_library_path;
242 static SystemProperty *_java_home;
243 static SystemProperty *_java_class_path;
244 static SystemProperty *_sun_boot_class_path;
245
246 // Meta-index for knowing what packages are in the boot class path
247 static char* _meta_index_path;
248 static char* _meta_index_dir;
249
250 // java.vendor.url.bug, bug reporting URL for fatal errors.
251 static const char* _java_vendor_url_bug;
252
253 // sun.java.launcher, private property to provide information about
254 // java/gamma launcher
255 static const char* _sun_java_launcher;
256
257 // sun.java.launcher.pid, private property
258 static int _sun_java_launcher_pid;
259
260 // was this VM created by the gamma launcher
261 static bool _created_by_gamma_launcher;
262
263 // Option flags
264 static bool _has_profile;
265 static bool _has_alloc_profile;
266 static const char* _gc_log_filename;
267 static uintx _min_heap_size;
268
269 // -Xrun arguments
270 static AgentLibraryList _libraryList;
271 static void add_init_library(const char* name, char* options)
272 { _libraryList.add(new AgentLibrary(name, options, false, NULL)); }
273
274 // -agentlib and -agentpath arguments
275 static AgentLibraryList _agentList;
276 static void add_init_agent(const char* name, char* options, bool absolute_path)
277 { _agentList.add(new AgentLibrary(name, options, absolute_path, NULL)); }
278
279 // Late-binding agents not started via arguments
280 static void add_loaded_agent(const char* name, char* options, bool absolute_path, void* os_lib)
281 { _agentList.add(new AgentLibrary(name, options, absolute_path, os_lib)); }
282
430 // print jvm_flags, jvm_args and java_command
431 static void print_on(outputStream* st);
432
433 // convenient methods to obtain / print jvm_flags and jvm_args
434 static const char* jvm_flags() { return build_resource_string(_jvm_flags_array, _num_jvm_flags); }
435 static const char* jvm_args() { return build_resource_string(_jvm_args_array, _num_jvm_args); }
436 static void print_jvm_flags_on(outputStream* st);
437 static void print_jvm_args_on(outputStream* st);
438
439 // -Dkey=value flags
440 static SystemProperty* system_properties() { return _system_properties; }
441 static const char* get_property(const char* key);
442
443 // -Djava.vendor.url.bug
444 static const char* java_vendor_url_bug() { return _java_vendor_url_bug; }
445
446 // -Dsun.java.launcher
447 static const char* sun_java_launcher() { return _sun_java_launcher; }
448 // Was VM created by a Java launcher?
449 static bool created_by_java_launcher();
450 // Was VM created by the gamma Java launcher?
451 static bool created_by_gamma_launcher();
452 // -Dsun.java.launcher.pid
453 static int sun_java_launcher_pid() { return _sun_java_launcher_pid; }
454
455 // -Xloggc:<file>, if not specified will be NULL
456 static const char* gc_log_filename() { return _gc_log_filename; }
457
458 // -Xprof/-Xaprof
459 static bool has_profile() { return _has_profile; }
460 static bool has_alloc_profile() { return _has_alloc_profile; }
461
462 // -Xms, -Xmx
463 static uintx min_heap_size() { return _min_heap_size; }
464 static void set_min_heap_size(uintx v) { _min_heap_size = v; }
465
466 // -Xrun
467 static AgentLibrary* libraries() { return _libraryList.first(); }
468 static bool init_libraries_at_startup() { return !_libraryList.is_empty(); }
469 static void convert_library_to_agent(AgentLibrary* lib)
470 { _libraryList.remove(lib);
471 _agentList.add(lib); }
|