mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
7017240: C2: native memory leak in nsk/regression/b4675027 on windows-x86 in comp mode with G1
Add ResourceMark into PhaseIdealLoop::build_and_optimize(). Reviewed-by: never
This commit is contained in:
parent
f743a9db84
commit
c00a50c8e9
2 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1480,6 +1480,8 @@ void PhaseIdealLoop::eliminate_useless_predicates() {
|
|||
// Create a PhaseLoop. Build the ideal Loop tree. Map each Ideal Node to
|
||||
// its corresponding LoopNode. If 'optimize' is true, do some loop cleanups.
|
||||
void PhaseIdealLoop::build_and_optimize(bool do_split_ifs, bool do_loop_pred) {
|
||||
ResourceMark rm;
|
||||
|
||||
int old_progress = C->major_progress();
|
||||
|
||||
// Reset major-progress flag for the driver's heuristics
|
||||
|
@ -2013,7 +2015,7 @@ void PhaseIdealLoop::recompute_dom_depth() {
|
|||
if (_dom_stk == NULL) {
|
||||
uint init_size = C->unique() / 100; // Guess that 1/100 is a reasonable initial size.
|
||||
if (init_size < 10) init_size = 10;
|
||||
_dom_stk = new (C->node_arena()) GrowableArray<uint>(C->node_arena(), init_size, 0, 0);
|
||||
_dom_stk = new GrowableArray<uint>(init_size);
|
||||
}
|
||||
// Compute new depth for each node.
|
||||
for (i = 0; i < _idom_size; i++) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -700,7 +700,7 @@ private:
|
|||
PhaseIdealLoop( PhaseIterGVN &igvn) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(NULL),
|
||||
_verify_only(true) {
|
||||
build_and_optimize(false, false);
|
||||
|
@ -721,7 +721,7 @@ public:
|
|||
PhaseIdealLoop( PhaseIterGVN &igvn, bool do_split_ifs, bool do_loop_pred) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(NULL),
|
||||
_verify_only(false) {
|
||||
build_and_optimize(do_split_ifs, do_loop_pred);
|
||||
|
@ -731,7 +731,7 @@ public:
|
|||
PhaseIdealLoop( PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me) :
|
||||
PhaseTransform(Ideal_Loop),
|
||||
_igvn(igvn),
|
||||
_dom_lca_tags(C->comp_arena()),
|
||||
_dom_lca_tags(arena()), // Thread::resource_area
|
||||
_verify_me(verify_me),
|
||||
_verify_only(false) {
|
||||
build_and_optimize(false, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue