Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a3f3ff42
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a3f3ff42
编写于
5月 13, 2020
作者:
L
lzang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8241638: launcher time metrics always report 1 on Linux when _JAVA_LAUNCHER_DEBUG set
Reviewed-by: alanb, dholmes, phh, andrew
上级
969edab9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
14 deletion
+35
-14
make/CompileLaunchers.gmk
make/CompileLaunchers.gmk
+1
-1
src/macosx/bin/java_md_macosx.c
src/macosx/bin/java_md_macosx.c
+1
-1
src/share/bin/java.c
src/share/bin/java.c
+6
-6
src/solaris/bin/java_md_solinux.c
src/solaris/bin/java_md_solinux.c
+21
-0
src/solaris/bin/java_md_solinux.h
src/solaris/bin/java_md_solinux.h
+6
-6
未找到文件。
make/CompileLaunchers.gmk
浏览文件 @
a3f3ff42
...
...
@@ -163,7 +163,7 @@ define SetupLauncher
-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-DPROGNAME='"$1"' $(DPACKAGEPATH) \
$2, \
CFLAGS_solaris := -KPIC
-DHAVE_GETHRTIME
, \
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(ORIGIN_ARG) \
$$($1_LDFLAGS), \
...
...
src/macosx/bin/java_md_macosx.c
浏览文件 @
a3f3ff42
...
...
@@ -752,7 +752,7 @@ CounterGet()
{
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
return
(
tv
.
tv_sec
*
1000
)
+
tv
.
tv_usec
;
return
(
tv
.
tv_sec
*
1000
000
)
+
tv
.
tv_usec
;
}
...
...
src/share/bin/java.c
浏览文件 @
a3f3ff42
...
...
@@ -191,7 +191,7 @@ JLI_Launch(int argc, char ** argv, /* main argc, argc */
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
];
...
...
@@ -367,7 +367,7 @@ JavaMain(void * _args)
jmethodID
mainID
;
jobjectArray
mainArgs
;
int
ret
=
0
;
jlong
start
,
end
;
jlong
start
=
0
,
end
=
0
;
RegisterThread
();
...
...
@@ -1320,7 +1320,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
())
{
...
...
@@ -1336,7 +1336,7 @@ LoadMainClass(JNIEnv *env, int mode, char *name)
env
,
cls
,
mid
,
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
);
...
...
@@ -1727,7 +1727,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
;
...
...
@@ -1836,7 +1836,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
));
}
...
...
src/solaris/bin/java_md_solinux.c
浏览文件 @
a3f3ff42
...
...
@@ -1111,3 +1111,24 @@ ProcessPlatformOption(const char *arg)
{
return
JNI_FALSE
;
}
#ifndef __solaris__
/*
* Provide a CounterGet() implementation based on gettimeofday() which
* is universally available, even though it may not be 'high resolution'
* compared to platforms that provide gethrtime() (like Solaris). It is
* also subject to time-of-day changes, but alternatives may not be
* known to be available at either build time or run time.
*/
uint64_t
CounterGet
()
{
uint64_t
result
=
0
;
struct
timeval
tv
;
if
(
gettimeofday
(
&
tv
,
NULL
)
!=
-
1
)
{
result
=
1000000LL
*
(
uint64_t
)
tv
.
tv_sec
;
result
+=
(
uint64_t
)
tv
.
tv_usec
;
}
return
result
;
}
#endif // !__solaris__
src/solaris/bin/java_md_solinux.h
浏览文件 @
a3f3ff42
...
...
@@ -26,17 +26,17 @@
#ifndef JAVA_MD_SOLINUX_H
#define JAVA_MD_SOLINUX_H
#ifdef HAVE_GETHRTIME
#include <sys/time.h>
#ifdef __solaris__
/*
* Support for doing cheap, accurate interval timing.
*/
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
#else
/* !
HAVE_GETHRTIME
*/
#define CounterGet() (0)
#define Counter2Micros(counts) (
1
)
#endif
/*
HAVE_GETHRTIME
*/
#else
/* !
__solaris__
*/
uint64_t
CounterGet
(
void
);
#define Counter2Micros(counts) (
counts
)
#endif
/*
__solaris__
*/
/* pointer to environment */
extern
char
**
environ
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录