Skip to content

Commit

Permalink
[EagerAppCDS] fix bug 1.jstat stdout extra info 2.filter zip for bootcp
Browse files Browse the repository at this point in the history
Summary: 1. eliminate extra info for jstat - testcase:
sun/tools/jstat/jstatClassOutput1.sh
2. shouldn't filter zip when processing bootclasspath - testcase:
tools/javac/Paths/Class-Path.sh
tools/javac/Paths/MineField.sh

Test Plan: ci jtreg
sun/tools/jstat/jstatClassOutput1.sh
tools/javac/Paths/Class-Path.sh
tools/javac/Paths/MineField.sh

Reviewed-by: lingjun-cg, yuleil

Issue: dragonwell-project#557
CR:
  • Loading branch information
jia-wei-tang committed Jul 12, 2023
1 parent 1640100 commit 2d8d64e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 152 deletions.
24 changes: 0 additions & 24 deletions hotspot/src/share/vm/classfile/classLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,32 +708,8 @@ void ClassLoader::setup_search_path(const char *class_path, bool canonicalize) {
}
}


bool is_jar_file(const char *path) {
int len = 0;
while(path[len] != '\0') {
len++;
}
return len >= 5 && (strncmp(path + (len-4), ".jar", 4) == 0);
}

bool is_dir(const char *path) {
struct stat mystat;
int ret_val = 0;
ret_val = stat(path, &mystat);
if (ret_val < 0) {
return false;
}
ret_val = S_ISDIR(mystat.st_mode);
return ret_val > 0;
}

ClassPathEntry* ClassLoader::create_class_path_entry(const char *path, const struct stat* st,
bool lazy, bool throw_exception, TRAPS) {
// must be jar file or dir
if(!is_jar_file(path) && !is_dir(path)) {
return NULL;
}

JavaThread* thread = JavaThread::current();
if (lazy) {
Expand Down
128 changes: 0 additions & 128 deletions jdk/src/share/classes/sun/tools/jstat/resources/jstat_options
Original file line number Diff line number Diff line change
Expand Up @@ -75,134 +75,6 @@ option class {
width 10
format "0.00"
}
column {
header "CustNum^" /* Number of loaded application classes */
data sun.cls.appClassLoadCount
align right
scale raw
width 5
format "0"
}
column {
header "loadClass^" /* Accumulated time for loading app classes */
data sun.cls.appClassLoadTime/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "loadClass.sf^" /* Accumulated time for loading app classes */
data sun.cls.appClassLoadTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "CDSCast^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadTime/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "CDSCast.self^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "CDSCast.count^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadCount
align right
scale raw
width 5
format "0"
}
column {
header "CJ1^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadCallJavaTime/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "CJ1.sf^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadCallJavaTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "CJ1.cnt^" /* Accumulated time for CDS Custom classloader loading classes from shared archive */
data sun.cls.CDSCustClassLoadCallJavaCount
align right
scale raw
width 5
format "0"
}
column {
header "DefClz^" /* Accumulated time for defineClass */
data sun.cls.defineAppClassTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "Init^" /* Accumulated time for class initialization */
data sun.cls.classInitTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "sysLoad^" /* Accumulated time for loading non-shared system classes */
data sun.cls.sysClassLoadTime/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "sysFind^" /* Time spent in looking up/reading of system classes */
data sun.cls.lookupSysClassTime/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "Find^" /* Accumulated time for findClass */
data sun.classloader.findClassTime/1000000000
scale raw
align right
width 10
format "0.000"
}
column {
header "Parse^" /* Time spent in parsing system classes */
data sun.cls.parseClassTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
column {
header "^Verify^" /* Number of verified classes */
data sun.cls.classVerifyTime.self/sun.os.hrt.frequency
scale raw
align right
width 10
format "0.000"
}
}

option compiler {
Expand Down

0 comments on commit 2d8d64e

Please sign in to comment.