/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_RUNTIME_ARGUMENTS_HPP
#define SHARE_VM_RUNTIME_ARGUMENTS_HPP
#include "runtime/perfData.hpp"
// Arguments parses the command line and recognizes options
// Invocation API hook typedefs (these should really be defined in jni.hpp)
extern "C" {
}
// Forward declarations
class SysClassPath;
// Element describing System and User (-Dkey=value flags) defined property.
private:
char* _key;
char* _value;
bool _writeable;
public:
// Accessors
if (writeable()) {
}
}
return true;
}
return false;
}
char *sp;
}
} else {
}
}
}
}
// Constructor
} else {
}
} else {
}
}
};
// For use by -agentlib, -agentpath and -Xrun
friend class AgentLibraryList;
private:
char* _name;
char* _options;
void* _os_lib;
bool _is_absolute_path;
public:
// Accessors
// Constructor
} else {
}
}
};
// maintain an order of entry list of AgentLibrary
private:
public:
// add to the end of the list
if (is_empty()) {
} else {
}
}
// search for and remove a library known to be in the list
break;
}
}
// it was found, by-pass this library
} else {
}
}
}
}
AgentLibraryList() {
}
};
friend class VMStructs;
friend class JvmtiExport;
public:
// Operation modi
enum Mode {
};
enum ArgsRange {
arg_in_range = 0
};
private:
// an array containing all flags specified in the .hotspotrc file
static char** _jvm_flags_array;
static int _num_jvm_flags;
// an array containing all jvm arguments specified in the command line
static char** _jvm_args_array;
static int _num_jvm_args;
static char* _java_command;
// Property list
// Quick accessor to System properties in the list:
// Meta-index for knowing what packages are in the boot class path
static char* _meta_index_path;
static char* _meta_index_dir;
// java.vendor.url.bug, bug reporting URL for fatal errors.
static const char* _java_vendor_url_bug;
// sun.java.launcher, private property to provide information about
static const char* _sun_java_launcher;
// sun.java.launcher.pid, private property
static int _sun_java_launcher_pid;
// was this VM created by the gamma launcher
static bool _created_by_gamma_launcher;
// Option flags
static bool _has_profile;
static bool _has_alloc_profile;
static const char* _gc_log_filename;
// -Xrun arguments
// -agentlib and -agentpath arguments
// Late-binding agents not started via arguments
// Operation modi
static bool _java_compiler;
// -Xdebug flag
static bool _xdebug_mode;
// Used to save default settings
static bool _AlwaysCompileLoopMethods;
static bool _UseOnStackReplacement;
static bool _BackgroundCompilation;
static bool _ClipInlining;
static bool _CIDynamicCompilePriority;
// Tiered
static void set_tiered_flags();
static void set_parnew_gc_flags();
static void set_cms_and_parnew_gc_flags();
// UseParallel[Old]GC
static void set_parallel_gc_flags();
// Garbage-First (UseG1GC)
static void set_g1_gc_flags();
// GC ergonomics
static void set_ergonomics_flags();
static void set_shared_spaces_flags();
// Setup HeapBaseMinAddress
static void set_heap_base_min_address();
// Setup heap size
static void set_heap_size();
// Based on automatic selection criteria, should the
// low pause collector be used.
static bool should_auto_select_low_pause_collector();
// Bytecode rewriting
static void set_bytecode_flags();
// Invocation API hooks
// System properties
static bool add_property(const char* prop);
// Aggressive optimization flags.
static void set_aggressive_opts_flags();
// Argument parsing
static void do_pd_flag_adjustments();
static bool process_argument(const char* arg, jboolean ignore_unrecognized, FlagValueOrigin origin);
static void process_java_launcher_argument(const char*, void*);
static void process_java_compiler_argument(char* arg);
static jint parse_options_environment_variable(const char* name, SysClassPath* scp_p, bool* scp_assembly_required_p);
static jint parse_java_tool_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
static jint parse_java_options_environment_variable(SysClassPath* scp_p, bool* scp_assembly_required_p);
static jint parse_each_vm_init_arg(const JavaVMInitArgs* args, SysClassPath* scp_p, bool* scp_assembly_required_p, FlagValueOrigin origin);
const char* option_type);
}
// Parse a string for a unsigned integer. Returns true if value
// is an unsigned integer greater than or equal to the minimum
// parameter passed and returns the value in uintx_arg. Returns
// false otherwise, with uintx_arg undefined.
// methods to build strings from individual args
static void build_jvm_args(const char* arg);
static void build_jvm_flags(const char* arg);
static bool methodExists(
char* className, char* methodName,
);
static void parseOnlyLine(
const char* line,
);
// Returns true if the string s is in the list of flags that have recently
// been made obsolete. If we detect one of these flags on the command
// line, instead of failing we print a warning message and ignore the
// flag. This gives the user a release or so to stop using the flag.
static short CompileOnlyClassesNum;
static short CompileOnlyClassesMax;
static char** CompileOnlyClasses;
static bool* CompileOnlyAllMethods;
static short CompileOnlyMethodsNum;
static short CompileOnlyMethodsMax;
static char** CompileOnlyMethods;
static bool* CompileOnlyAllClasses;
static short InterpretOnlyClassesNum;
static short InterpretOnlyClassesMax;
static char** InterpretOnlyClasses;
static bool* InterpretOnlyAllMethods;
static bool CheckCompileOnly;
static char* SharedArchivePath;
public:
// Parses the arguments
// Check for consistency in the selection of the garbage collector.
static bool check_gc_consistency();
// Check consistecy or otherwise of VM argument settings
static bool check_vm_args_consistency();
// Check stack pages settings
static bool check_stack_pages();
// Used by os_solaris
static bool process_settings_file(const char* file_name, bool should_exist, jboolean ignore_unrecognized);
// return a char* array containing all options
// return the arguments passed to the Java application
// print jvm_flags, jvm_args and java_command
// convenient methods to obtain / print jvm_flags and jvm_args
// -Dkey=value flags
static const char* get_property(const char* key);
// -Djava.vendor.url.bug
// -Dsun.java.launcher
// Was VM created by a Java launcher?
static bool created_by_java_launcher();
// Was VM created by the gamma Java launcher?
static bool created_by_gamma_launcher();
// -Dsun.java.launcher.pid
// -Xloggc:<file>, if not specified will be NULL
// -Xprof/-Xaprof
// -Xms, -Xmx
// -Xrun
// -agentlib -agentpath
// abort, exit, vfprintf hooks
return
);
}
// Java launcher properties
// System properties
static void init_system_properties();
// Update/Initialize System properties after JDK version number is known
static void init_version_specific_system_properties();
// Property List manipulation
PropertyList_unique_add(plist, k, v, false);
}
static void PropertyList_unique_add(SystemProperty** plist, const char* k, char* v, jboolean append);
// Miscellaneous System property value getter and setters.
}
// Operation modi
// Utility: copies src into buf, replacing "%%" with "%" and "%p" with pid.
};
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP