review request (XS): 6728025 LinkResolver missing ResourceMarks
John Coomes
John.Coomes at oracle.com
Thu May 5 08:37:44 PDT 2011
David Holmes (David.Holmes at oracle.com) wrote:
> Hi Ramki,
>
> Not speaking for John but ...
>
> Y. Srinivas Ramakrishna said the following on 05/05/11 14:37:
> > Hi John -- Help me here in case I am missing something
> > subtle: Why not just move all those local ResourceMark's up into the
> > outermost scope of each of those methods? I see no loops
> > anywhere and I don't expect that doing a resource mark in
> > each if is any better than just doing it at the top of each
> > method once and be done?
>
> Moving them would require a performance analysis. I don't know what a
> ResourceMark costs but presently they are only used on the error paths
> that will throw exceptions.
I was going to say basically the same thing. The cost of a
ResourceMark that doesn't allocate or free anything is fairly small (a
handful of loads and stores and a branch or two), but I don't know how
much these methods are used.
-John
> > On 5/4/2011 7:10 PM, John Coomes wrote:
> >> I'd appreciate reviews of a simple fix that adds ResourceMarks to a
> >> number of error handling branches in LinkResolver:
> >>
> >> http://cr.openjdk.java.net/~jcoomes/6728025-linkresolver-resourcemark/
> >>
> >> -John
> >
More information about the hotspot-runtime-dev
mailing list