RFR: 8007806: Need a Throwables performance counter
peter.levart at gmail.com
Mon Feb 25 17:05:44 UTC 2013
On 02/25/2013 05:30 PM, Nils Loodin wrote:
> On 02/25/2013 02:30 PM, Peter Levart wrote:
>> On 02/25/2013 10:29 AM, Nils Loodin wrote:
>>> On 02/24/2013 11:18 PM, David Holmes wrote:
>>>> We've not-so-slightly hijacked Nils' thread here - apologies for that.
>>> David, Peter!
>>> Yes you did :)
>>> However, feel free to make it up to me by:
>>> 1. Suggest a good name for the counter
>> As Jason Mehrens pointed out in this thread, the "thrownThrowables"
>> might be misleading if the counter is incremented in the Throwable
>> constructors (or are you going to instrument the throw sites?). So it
>> might better be called what it is: "constructedThrowables". Yes, this
>> is a common idiom:
>> throw new ThrowableSubclass(...);
>> ...but the number of thrown and constructed throwables may diverge
>> considerably in situations like for example:
>> - preallocated throwable instances used (and reused) as a form of
>> "long return" (from lambdas).
>> - deserialized throwables on RMI clients that are thrown on the
>> server side, transfered over the wire and re-thrown on client side
>> (de-seriailization does not call the constructor)
> I changed it to
> in http://cr.openjdk.java.net/~nloodin/8007806/webrev.01/
> Is this better? However, bear in mind that it's not exactly specified
> where this is going to be incremented from yet. Nothing in this change
> states that it's going to be incremented from the Throwable constructor.
These are just suggestions... thinking loud ...
Other hierarchical names for counters use two common forms (note
So by these forms, the name could be:
might be later changed to (if instrumented to increment at construction
time and/or throw time):
until then, it could be simply:
> Nils Loodin
More information about the core-libs-dev