Mercurial > hg > truffle
diff src/share/vm/opto/escape.hpp @ 2249:3763ca6579b7
7013538: Java memory leak with escape analysis
Summary: Don't allocate VectorSet iterator on C heap. Reuse resource storage in EA.
Reviewed-by: never
author | kvn |
---|---|
date | Mon, 07 Feb 2011 10:25:39 -0800 |
parents | f95d63e2154a |
children | 59e515ee9354 |
line wrap: on
line diff
--- a/src/share/vm/opto/escape.hpp Mon Feb 07 09:46:01 2011 -0800 +++ b/src/share/vm/opto/escape.hpp Mon Feb 07 10:25:39 2011 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -268,7 +268,12 @@ // walk the connection graph starting at the node corresponding to "n" and // add the index of everything it could point to, to "ptset". This may cause // Phi's encountered to get (re)processed (which requires "phase".) - void PointsTo(VectorSet &ptset, Node * n); + VectorSet* PointsTo(Node * n); + + // Reused structures for PointsTo(). + VectorSet pt_ptset; + VectorSet pt_visited; + GrowableArray<uint> pt_worklist; // Edge manipulation. The "from_i" and "to_i" arguments are the // node indices of the source and destination of the edge @@ -334,8 +339,11 @@ // Set the escape state of a node void set_escape_state(uint ni, PointsToNode::EscapeState es); - // Search for objects which are not scalar replaceable. - void verify_escape_state(int nidx, VectorSet& ptset, PhaseTransform* phase); + // Adjust escape state after Connection Graph is built. + void adjust_escape_state(int nidx, PhaseTransform* phase); + + // Compute the escape information + bool compute_escape(); public: ConnectionGraph(Compile *C, PhaseIterGVN *igvn); @@ -346,9 +354,6 @@ // Perform escape analysis static void do_analysis(Compile *C, PhaseIterGVN *igvn); - // Compute the escape information - bool compute_escape(); - // escape state of a node PointsToNode::EscapeState escape_state(Node *n);