Mercurial > hg > truffle
annotate src/share/vm/opto/stringopts.hpp @ 1994:6cd6d394f280
7001033: assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed())
7002546: regression on SpecJbb2005 on 7b118 comparing to 7b117 on small heaps
Summary: Relaxed assertion checking related to incremental_collection_failed flag to allow for ExplicitGCInvokesConcurrent behaviour where we do not want a failing scavenge to bail to a stop-world collection. Parameterized incremental_collection_will_fail() so we can selectively use, or not use, as appropriate, the statistical prediction at specific use sites. This essentially reverts the scavenge bail-out logic to what it was prior to some recent changes that had inadvertently started using the statistical prediction which can be noisy in the presence of bursty loads. Added some associated verbose non-product debugging messages.
Reviewed-by: johnc, tonyp
author | ysr |
---|---|
date | Tue, 07 Dec 2010 21:55:53 -0800 |
parents | f95d63e2154a |
children | 8f972594effc |
rev | line source |
---|---|
1080 | 1 /* |
1972 | 2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
1080 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1080
diff
changeset
|
21 * questions. |
1080 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OPTO_STRINGOPTS_HPP |
26 #define SHARE_VM_OPTO_STRINGOPTS_HPP | |
27 | |
28 #include "opto/node.hpp" | |
29 #include "opto/phaseX.hpp" | |
30 | |
1080 | 31 class StringConcat; |
32 | |
33 class PhaseStringOpts : public Phase { | |
34 friend class StringConcat; | |
35 | |
36 private: | |
37 PhaseGVN* _gvn; | |
38 | |
39 // List of dead nodes to clean up aggressively at the end | |
40 Unique_Node_List dead_worklist; | |
41 | |
42 // Memory slices needed for code gen | |
43 int char_adr_idx; | |
44 int value_field_idx; | |
45 int count_field_idx; | |
46 int offset_field_idx; | |
47 | |
48 // Integer.sizeTable - used for int to String conversion | |
49 ciField* size_table_field; | |
50 | |
51 // A set for use by various stages | |
52 VectorSet _visited; | |
53 | |
54 // Collect a list of all SB.toString calls | |
55 Node_List collect_toString_calls(); | |
56 | |
57 // Examine the use of the SB alloc to see if it can be replace with | |
58 // a single string construction. | |
59 StringConcat* build_candidate(CallStaticJavaNode* call); | |
60 | |
61 // Replace all the SB calls in concat with an optimization String allocation | |
62 void replace_string_concat(StringConcat* concat); | |
63 | |
64 // Load the value of a static field, performing any constant folding. | |
65 Node* fetch_static_field(GraphKit& kit, ciField* field); | |
66 | |
67 // Compute the number of characters required to represent the int value | |
68 Node* int_stringSize(GraphKit& kit, Node* value); | |
69 | |
70 // Copy the characters representing value into char_array starting at start | |
71 void int_getChars(GraphKit& kit, Node* value, Node* char_array, Node* start, Node* end); | |
72 | |
73 // Copy of the contents of the String str into char_array starting at index start. | |
74 Node* copy_string(GraphKit& kit, Node* str, Node* char_array, Node* start); | |
75 | |
76 // Clean up any leftover nodes | |
77 void record_dead_node(Node* node); | |
78 void remove_dead_nodes(); | |
79 | |
80 PhaseGVN* gvn() { return _gvn; } | |
81 | |
82 enum { | |
83 // max length of constant string copy unrolling in copy_string | |
84 unroll_string_copy_length = 6 | |
85 }; | |
86 | |
87 public: | |
88 PhaseStringOpts(PhaseGVN* gvn, Unique_Node_List* worklist); | |
89 }; | |
1972 | 90 |
91 #endif // SHARE_VM_OPTO_STRINGOPTS_HPP |