mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8241638: launcher time metrics always report 1 on Linux when _JAVA_LAUNCHER_DEBUG set
Reviewed-by: alanb, dholmes
This commit is contained in:
parent
e18d66174a
commit
b317d0ee39
5 changed files with 35 additions and 14 deletions
|
@ -241,7 +241,7 @@ JLI_Launch(int argc, char ** argv, /* main argc, argv */
|
|||
char *main_class = NULL;
|
||||
int ret;
|
||||
InvocationFunctions ifn;
|
||||
jlong start, end;
|
||||
jlong start = 0, end = 0;
|
||||
char jvmpath[MAXPATHLEN];
|
||||
char jrepath[MAXPATHLEN];
|
||||
char jvmcfg[MAXPATHLEN];
|
||||
|
@ -408,7 +408,7 @@ JavaMain(void* _args)
|
|||
jmethodID mainID;
|
||||
jobjectArray mainArgs;
|
||||
int ret = 0;
|
||||
jlong start, end;
|
||||
jlong start = 0, end = 0;
|
||||
|
||||
RegisterThread();
|
||||
|
||||
|
@ -1618,7 +1618,7 @@ LoadMainClass(JNIEnv *env, int mode, char *name)
|
|||
jmethodID mid;
|
||||
jstring str;
|
||||
jobject result;
|
||||
jlong start, end;
|
||||
jlong start = 0, end = 0;
|
||||
jclass cls = GetLauncherHelperClass(env);
|
||||
NULL_CHECK0(cls);
|
||||
if (JLI_IsTraceLauncher()) {
|
||||
|
@ -1633,7 +1633,7 @@ LoadMainClass(JNIEnv *env, int mode, char *name)
|
|||
USE_STDERR, mode, str));
|
||||
|
||||
if (JLI_IsTraceLauncher()) {
|
||||
end = CounterGet();
|
||||
end = CounterGet();
|
||||
printf("%ld micro seconds to load main class\n",
|
||||
(long)(jint)Counter2Micros(end-start));
|
||||
printf("----%s----\n", JLDEBUG_ENV_ENTRY);
|
||||
|
@ -2080,7 +2080,7 @@ ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
|
|||
char line[MAXPATHLEN+20];
|
||||
int cnt = 0;
|
||||
int lineno = 0;
|
||||
jlong start, end;
|
||||
jlong start = 0, end = 0;
|
||||
int vmType;
|
||||
char *tmpPtr;
|
||||
char *altVMName = NULL;
|
||||
|
@ -2172,7 +2172,7 @@ ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
|
|||
knownVMsCount = cnt;
|
||||
|
||||
if (JLI_IsTraceLauncher()) {
|
||||
end = CounterGet();
|
||||
end = CounterGet();
|
||||
printf("%ld micro seconds to parse jvm.cfg\n",
|
||||
(long)(jint)Counter2Micros(end-start));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue