Mercurial > hg > truffle
annotate src/share/vm/prims/wbtestmethods/parserTests.cpp @ 12233:40136aa2cdb1
8010722: assert: failed: heap size is too big for compressed oops
Summary: Use conservative assumptions of required alignment for the various garbage collector components into account when determining the maximum heap size that supports compressed oops. Using this conservative value avoids several circular dependencies in the calculation.
Reviewed-by: stefank, dholmes
author | tschatzl |
---|---|
date | Wed, 11 Sep 2013 16:25:02 +0200 |
parents | da91efe96a93 |
children | 5b3b75d9eb2f |
rev | line source |
---|---|
5978
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5978
diff
changeset
|
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
5978
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
4 * |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
8 * |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
13 * accompanied this code). |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
14 * |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
18 * |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
21 * questions. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
22 * |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
23 */ |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
24 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
26 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
27 #include "classfile/symbolTable.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
28 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
29 #include "prims/jni.h" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
30 #include "prims/whitebox.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
31 #include "prims/wbtestmethods/parserTests.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
32 #include "runtime/interfaceSupport.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
33 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
34 #include "memory/oopFactory.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
35 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
36 #include "services/diagnosticArgument.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
37 #include "services/diagnosticFramework.hpp" |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
38 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
39 //There's no way of beforeahnd knowing an upper size |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
40 //Of the length of a string representation of |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
41 //the value of an argument. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
42 #define VALUE_MAXLEN 256 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
43 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
44 // DiagnosticFramework test utility methods |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
45 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
46 /* |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
47 * The DiagnosticArgumentType class contains an enum that says which type |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
48 * this argument represents. (JLONG, BOOLEAN etc). |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
49 * This method Returns a char* representation of that enum value. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
50 */ |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
51 static const char* lookup_diagnosticArgumentEnum(const char* field_name, oop object) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
52 Thread* THREAD = Thread::current(); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
53 const char* enum_sig = "Lsun/hotspot/parser/DiagnosticCommand$DiagnosticArgumentType;"; |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
54 TempNewSymbol enumSigSymbol = SymbolTable::lookup(enum_sig, (int) strlen(enum_sig), THREAD); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
55 int offset = WhiteBox::offset_for_field(field_name, object, enumSigSymbol); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
56 oop enumOop = object->obj_field(offset); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
57 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
58 const char* ret = WhiteBox::lookup_jstring("name", enumOop); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
59 return ret; |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
60 } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
61 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
62 /* |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
63 * Takes an oop to a DiagnosticArgumentType-instance and |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
64 * reads the fields from it. Fills an native DCmdParser with |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
65 * this info. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
66 */ |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
67 static void fill_in_parser(DCmdParser* parser, oop argument) |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
68 { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
69 const char* name = WhiteBox::lookup_jstring("name", argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
70 const char* desc = WhiteBox::lookup_jstring("desc", argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
71 const char* default_value = WhiteBox::lookup_jstring("defaultValue", argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
72 bool mandatory = WhiteBox::lookup_bool("mandatory", argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
73 const char* type = lookup_diagnosticArgumentEnum("type", argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
74 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
75 if (strcmp(type, "STRING") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
76 DCmdArgument<char*>* argument = new DCmdArgument<char*>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
77 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
78 "STRING", mandatory, default_value); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
79 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
80 } else if (strcmp(type, "NANOTIME") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
81 DCmdArgument<NanoTimeArgument>* argument = new DCmdArgument<NanoTimeArgument>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
82 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
83 "NANOTIME", mandatory, default_value); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
84 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
85 } else if (strcmp(type, "JLONG") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
86 DCmdArgument<jlong>* argument = new DCmdArgument<jlong>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
87 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
88 "JLONG", mandatory, default_value); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
89 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
90 } else if (strcmp(type, "BOOLEAN") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
91 DCmdArgument<bool>* argument = new DCmdArgument<bool>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
92 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
93 "BOOLEAN", mandatory, default_value); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
94 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
95 } else if (strcmp(type, "MEMORYSIZE") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
96 DCmdArgument<MemorySizeArgument>* argument = new DCmdArgument<MemorySizeArgument>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
97 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
98 "MEMORY SIZE", mandatory, default_value); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
99 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
100 } else if (strcmp(type, "STRINGARRAY") == 0) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
101 DCmdArgument<StringArrayArgument*>* argument = new DCmdArgument<StringArrayArgument*>( |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
102 name, desc, |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
103 "STRING SET", mandatory); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
104 parser->add_dcmd_option(argument); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
105 } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
106 } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
107 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
108 /* |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
109 * Will Fill in a java object array with alternating names of parsed command line options and |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
110 * the value that has been parsed for it: |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
111 * { name, value, name, value ... } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
112 * This can then be checked from java. |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
113 */ |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
114 WB_ENTRY(jobjectArray, WB_ParseCommandLine(JNIEnv* env, jobject o, jstring j_cmdline, jobjectArray arguments)) |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
115 ResourceMark rm; |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
116 DCmdParser parser; |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
117 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
118 const char* c_cmdline = java_lang_String::as_utf8_string(JNIHandles::resolve(j_cmdline)); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
119 objArrayOop argumentArray = objArrayOop(JNIHandles::resolve_non_null(arguments)); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
120 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
121 int length = argumentArray->length(); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
122 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
123 for (int i = 0; i < length; i++) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
124 oop argument_oop = argumentArray->obj_at(i); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
125 fill_in_parser(&parser, argument_oop); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
126 } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
127 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
128 CmdLine cmdline(c_cmdline, strlen(c_cmdline), true); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
129 parser.parse(&cmdline,',',CHECK_NULL); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
130 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
5978
diff
changeset
|
131 Klass* k = SystemDictionary::Object_klass(); |
5978
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
132 objArrayOop returnvalue_array = oopFactory::new_objArray(k, parser.num_arguments() * 2, CHECK_NULL); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
133 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
134 GrowableArray<const char *>*parsedArgNames = parser.argument_name_array(); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
135 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
136 for (int i = 0; i < parser.num_arguments(); i++) { |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
137 oop parsedName = java_lang_String::create_oop_from_str(parsedArgNames->at(i), CHECK_NULL); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
138 returnvalue_array->obj_at_put(i*2, parsedName); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
139 GenDCmdArgument* arg = parser.lookup_dcmd_option(parsedArgNames->at(i), strlen(parsedArgNames->at(i))); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
140 char buf[VALUE_MAXLEN]; |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
141 arg->value_as_str(buf, sizeof(buf)); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
142 oop parsedValue = java_lang_String::create_oop_from_str(buf, CHECK_NULL); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
143 returnvalue_array->obj_at_put(i*2+1, parsedValue); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
144 } |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
145 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
146 return (jobjectArray) JNIHandles::make_local(returnvalue_array); |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
147 |
51612f0c0a79
7148488: Whitebox tests for the Diagnostic Framework Parser
nloodin
parents:
diff
changeset
|
148 WB_END |