8005038: remove crufty '_g' support from SA

Reviewed-by: coleenp, mgronlun, rbackman
This commit is contained in:
Staffan Larsen 2013-05-07 14:33:09 +02:00
parent fd1ead19be
commit edf88d3db7
7 changed files with 91 additions and 68 deletions

View file

@ -589,8 +589,7 @@ init_classsharing_workaround(void *cd, const prmap_t* pmap, const char* obj_name
JNIEnv* env = dbg->env;
jobject this_obj = dbg->this_obj;
const char* jvm_name = 0;
if ((jvm_name = strstr(obj_name, "libjvm.so")) != NULL ||
(jvm_name = strstr(obj_name, "libjvm_g.so")) != NULL) {
if ((jvm_name = strstr(obj_name, "libjvm.so")) != NULL) {
jvm_name = obj_name;
} else {
return 0;
@ -598,7 +597,7 @@ init_classsharing_workaround(void *cd, const prmap_t* pmap, const char* obj_name
struct ps_prochandle* ph = (struct ps_prochandle*) env->GetLongField(this_obj, p_ps_prochandle_ID);
// initialize classes[_g].jsa file descriptor field.
// initialize classes.jsa file descriptor field.
dbg->env->SetIntField(this_obj, classes_jsa_fd_ID, -1);
// check whether class sharing is on by reading variable "UseSharedSpaces"
@ -641,7 +640,7 @@ init_classsharing_workaround(void *cd, const prmap_t* pmap, const char* obj_name
print_debug("looking for %s\n", classes_jsa);
// open the classes[_g].jsa
// open the classes.jsa
int fd = libsaproc_open(classes_jsa, O_RDONLY);
if (fd < 0) {
char errMsg[ERR_MSG_SIZE];
@ -651,7 +650,7 @@ init_classsharing_workaround(void *cd, const prmap_t* pmap, const char* obj_name
print_debug("opened shared archive file %s\n", classes_jsa);
}
// parse classes[_g].jsa
// parse classes.jsa
struct FileMapHeader* pheader = (struct FileMapHeader*) malloc(sizeof(struct FileMapHeader));
if (pheader == NULL) {
close(fd);
@ -798,8 +797,8 @@ static void attach_internal(JNIEnv* env, jobject this_obj, jstring cmdLine, jboo
if (! isProcess) {
/*
* With class sharing, shared perm. gen heap is allocated in with MAP_SHARED|PROT_READ.
* These pages are mapped from the file "classes[_g].jsa". MAP_SHARED pages are not dumped
* in Solaris core.To read shared heap pages, we have to read classes[_g].jsa file.
* These pages are mapped from the file "classes.jsa". MAP_SHARED pages are not dumped
* in Solaris core.To read shared heap pages, we have to read classes.jsa file.
*/
Pobject_iter(ph, init_classsharing_workaround, &dbg);
exception = env->ExceptionOccurred();