Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/arguments.cpp @ 3543:344264424174
Enable debugging of compiler code from Java IDEs. Moved binary to "graal" subdirectory. New flag for starting Graal is just "-graal".
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Sat, 13 Aug 2011 18:08:28 +0200 |
parents | c919f101c1bf |
children | 622bbc9dafbd |
comparison
equal
deleted
inserted
replaced
3541:f3ce30df0218 | 3543:344264424174 |
---|---|
2009 | 2009 |
2010 // Parse JavaVMInitArgs structure passed in | 2010 // Parse JavaVMInitArgs structure passed in |
2011 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, COMMAND_LINE); | 2011 result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, COMMAND_LINE); |
2012 if (result != JNI_OK) { | 2012 if (result != JNI_OK) { |
2013 return result; | 2013 return result; |
2014 } | |
2015 | |
2016 if (UseGraal) { | |
2017 if (PrintVMOptions) { | |
2018 tty->print("Running Graal VM... "); | |
2019 } | |
2020 const int BUFFER_SIZE = 1024; | |
2021 char maxine_dir[BUFFER_SIZE]; | |
2022 char temp[BUFFER_SIZE]; | |
2023 if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { | |
2024 fatal("Must set MAXINE environment variable to a Maxine project directory."); | |
2025 } | |
2026 if (PrintVMOptions) tty->print("MAXINE=%s", maxine_dir); | |
2027 sprintf(temp, "%s/com.oracle.max.cri/bin", maxine_dir); | |
2028 scp.add_prefix(temp); | |
2029 sprintf(temp, "%s/com.oracle.max.base/bin", maxine_dir); | |
2030 scp.add_prefix(temp); | |
2031 sprintf(temp, "%s/com.oracle.max.asmdis/bin", maxine_dir); | |
2032 scp.add_prefix(temp); | |
2033 sprintf(temp, "%s/com.oracle.max.asm/bin", maxine_dir); | |
2034 scp.add_prefix(temp); | |
2035 sprintf(temp, "%s/com.oracle.max.graal.graph/bin", maxine_dir); | |
2036 scp.add_prefix(temp); | |
2037 sprintf(temp, "%s/com.oracle.max.graal.compiler/bin", maxine_dir); | |
2038 scp.add_prefix(temp); | |
2039 sprintf(temp, "%s/com.oracle.max.graal.nodes/bin", maxine_dir); | |
2040 scp.add_prefix(temp); | |
2041 sprintf(temp, "%s/com.oracle.max.graal.extensions/bin", maxine_dir); | |
2042 scp.add_prefix(temp); | |
2043 sprintf(temp, "%s/com.oracle.max.graal.runtime/bin", maxine_dir); | |
2044 scp.add_prefix(temp); | |
2045 sprintf(temp, "%s/com.oracle.max.graal.graphviz/bin", maxine_dir); | |
2046 scp.add_prefix(temp); | |
2047 scp_assembly_required = true; | |
2014 } | 2048 } |
2015 | 2049 |
2016 if (AggressiveOpts) { | 2050 if (AggressiveOpts) { |
2017 // Insert alt-rt.jar between user-specified bootclasspath | 2051 // Insert alt-rt.jar between user-specified bootclasspath |
2018 // prefix and the default bootclasspath. os::set_boot_path() | 2052 // prefix and the default bootclasspath. os::set_boot_path() |
2671 if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { | 2705 if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) { |
2672 if (!process_argument(tail, args->ignoreUnrecognized, origin)) { | 2706 if (!process_argument(tail, args->ignoreUnrecognized, origin)) { |
2673 return JNI_EINVAL; | 2707 return JNI_EINVAL; |
2674 } | 2708 } |
2675 } | 2709 } |
2676 } else if (match_option(option, "-graal", &tail)) { | |
2677 if (PrintVMOptions) { | |
2678 tty->print("Running Graal VM... "); | |
2679 } | |
2680 UseGraal = true; | |
2681 BootstrapGraal = true; | |
2682 const int BUFFER_SIZE = 1024; | |
2683 char maxine_dir[BUFFER_SIZE]; | |
2684 char temp[BUFFER_SIZE]; | |
2685 if (!os::getenv("MAXINE", maxine_dir, sizeof(maxine_dir))) { | |
2686 fatal("Must set MAXINE environment variable to a Maxine project directory."); | |
2687 } | |
2688 if (PrintVMOptions) tty->print("MAXINE=%s", maxine_dir); | |
2689 sprintf(temp, "%s/com.oracle.max.cri/bin", maxine_dir); | |
2690 scp_p->add_prefix(temp); | |
2691 sprintf(temp, "%s/com.oracle.max.base/bin", maxine_dir); | |
2692 scp_p->add_prefix(temp); | |
2693 sprintf(temp, "%s/com.oracle.max.asmdis/bin", maxine_dir); | |
2694 scp_p->add_prefix(temp); | |
2695 sprintf(temp, "%s/com.oracle.max.asm/bin", maxine_dir); | |
2696 scp_p->add_prefix(temp); | |
2697 sprintf(temp, "%s/com.oracle.max.graal.graph/bin", maxine_dir); | |
2698 scp_p->add_prefix(temp); | |
2699 sprintf(temp, "%s/com.oracle.max.graal.compiler/bin", maxine_dir); | |
2700 scp_p->add_prefix(temp); | |
2701 sprintf(temp, "%s/com.oracle.max.graal.nodes/bin", maxine_dir); | |
2702 scp_p->add_prefix(temp); | |
2703 sprintf(temp, "%s/com.oracle.max.graal.extensions/bin", maxine_dir); | |
2704 scp_p->add_prefix(temp); | |
2705 sprintf(temp, "%s/com.oracle.max.graal.runtime/bin", maxine_dir); | |
2706 scp_p->add_prefix(temp); | |
2707 sprintf(temp, "%s/com.oracle.max.graal.graphviz/bin", maxine_dir); | |
2708 scp_p->add_prefix(temp); | |
2709 *scp_assembly_required_p = true; | |
2710 } else if (match_option(option, "-G:", &tail)) { // -G:XXX | 2710 } else if (match_option(option, "-G:", &tail)) { // -G:XXX |
2711 // Option for the graal compiler. | 2711 // Option for the graal compiler. |
2712 if (PrintVMOptions) { | 2712 if (PrintVMOptions) { |
2713 tty->print_cr("graal option %s", tail); | 2713 tty->print_cr("graal option %s", tail); |
2714 } | 2714 } |