comparison src/share/vm/runtime/arguments.cpp @ 4345:176d60b77d31

Moved PrintCompilation logic from graal.compiler to graal.hotspot. Made bootclasspath generated from the GRAAL environment option more generic (such that adding/removing a project requires no changes in the C++ part).
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 10 Jan 2012 23:00:17 +0100
parents 67e88b7624d5
children 685cbfb8e08e
comparison
equal deleted inserted replaced
4344:504bc518a582 4345:176d60b77d31
2094 jio_fprintf(defaultStream::output_stream(), "Error while starting Graal VM: The GRAAL environment variable needs to point to the directory containing the Graal projects.\n"); 2094 jio_fprintf(defaultStream::output_stream(), "Error while starting Graal VM: The GRAAL environment variable needs to point to the directory containing the Graal projects.\n");
2095 vm_exit(0); 2095 vm_exit(0);
2096 } 2096 }
2097 } 2097 }
2098 if (PrintVMOptions) tty->print_cr("GRAAL=%s", graal_dir); 2098 if (PrintVMOptions) tty->print_cr("GRAAL=%s", graal_dir);
2099 2099
2100 SysClassPath scp_compiler(Arguments::get_sysclasspath()); 2100 SysClassPath scp_compiler(Arguments::get_sysclasspath());
2101 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.cri"); 2101 struct dirent* dentry;
2102 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.criutils"); 2102 char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(graal_dir));
2103 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.base"); 2103 errno = 0;
2104 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.asmdis"); 2104 DIR* graal_dir_handle = os::opendir(graal_dir);
2105 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.asm"); 2105 while ((dentry = os::readdir(graal_dir_handle, (struct dirent *)tdbuf)) != NULL) {
2106 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.graph"); 2106 if (strcmp(dentry->d_name, ".") != 0 && strcmp(dentry->d_name, "..")) {
2107 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.compiler"); 2107 prepend_to_graal_classpath(scp_compiler, graal_dir, dentry->d_name);
2108 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.nodes"); 2108 if (PrintVMOptions) {
2109 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.snippets"); 2109 tty->print_cr("Adding project directory %s to bootclasspath", dentry->d_name);
2110 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.hotspot"); 2110 }
2111 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.printer"); 2111 }
2112 prepend_to_graal_classpath(scp_compiler, graal_dir, "com.oracle.max.graal.java"); 2112 }
2113 os::closedir(graal_dir_handle);
2114 FREE_C_HEAP_ARRAY(char, tdbuf);
2113 scp_compiler.expand_endorsed(); 2115 scp_compiler.expand_endorsed();
2114 2116
2115 Arguments::set_compilerclasspath(scp_compiler.combined_path()); 2117 Arguments::set_compilerclasspath(scp_compiler.combined_path());
2116 } 2118 }
2117 2119