8191846: jstat prints debug message when debugging is disabled

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

8191846: jstat prints debug message when debugging is disabled

Per Liden
Hi,

jstat is designed to handle the case where a perf counter doesn't exits.
In the output jstat will then print a "-" instead of the perf counter
value to indicate that the counter doesn't exist. However, jstat also
prints an unnecessary message, which clobbers the output. This message
might still be useful for debugging, but should only be printed when
jstat is running with debug messages enabled
(-J-DExpressionResolver.debug=true).

Webrev: http://cr.openjdk.java.net/~pliden/8191846/webrev.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8191846
Testing: hs-tier1, hs-tier2

/Per
Reply | Threaded
Open this post in threaded view
|

Re: 8191846: jstat prints debug message when debugging is disabled

Erik Helin-2
Hi Per,

On 11/24/2017 09:01 AM, Per Liden wrote:

> Hi,
>
> jstat is designed to handle the case where a perf counter doesn't exits.
> In the output jstat will then print a "-" instead of the perf counter
> value to indicate that the counter doesn't exist. However, jstat also
> prints an unnecessary message, which clobbers the output. This message
> might still be useful for debugging, but should only be printed when
> jstat is running with debug messages enabled
> (-J-DExpressionResolver.debug=true).
>
> Webrev: http://cr.openjdk.java.net/~pliden/8191846/webrev.0/

I have limited experience of jstat (I have only contributed two patches
to jstat), but this looks good as far as I can see.

Thanks,
Erik

> Bug: https://bugs.openjdk.java.net/browse/JDK-8191846
> Testing: hs-tier1, hs-tier2
>
> /Per
Reply | Threaded
Open this post in threaded view
|

Re: 8191846: jstat prints debug message when debugging is disabled

Per Liden
Thanks for reviewing Erik.

Erik pointer out to me off-line that we have additional jstat tests that
where not covered by the hs-triers I ran, so I also ran the following
tests and they all passed.

make run-test TEST=open/test/jdk/sun/tools/jstat
make run-test TEST=open/test/jdk/sun/tools/jstatd

/Per

On 2017-11-24 09:13, Erik Helin wrote:

> Hi Per,
>
> On 11/24/2017 09:01 AM, Per Liden wrote:
>> Hi,
>>
>> jstat is designed to handle the case where a perf counter doesn't
>> exits. In the output jstat will then print a "-" instead of the perf
>> counter value to indicate that the counter doesn't exist. However,
>> jstat also prints an unnecessary message, which clobbers the output.
>> This message might still be useful for debugging, but should only be
>> printed when jstat is running with debug messages enabled
>> (-J-DExpressionResolver.debug=true).
>>
>> Webrev: http://cr.openjdk.java.net/~pliden/8191846/webrev.0/
>
> I have limited experience of jstat (I have only contributed two patches
> to jstat), but this looks good as far as I can see.
>
> Thanks,
> Erik
>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8191846
>> Testing: hs-tier1, hs-tier2
>>
>> /Per
Reply | Threaded
Open this post in threaded view
|

Re: 8191846: jstat prints debug message when debugging is disabled

Robbin Ehn
In reply to this post by Per Liden
Looks good, Robbin

On 11/24/2017 09:01 AM, Per Liden wrote:

> Hi,
>
> jstat is designed to handle the case where a perf counter doesn't exits. In the
> output jstat will then print a "-" instead of the perf counter value to indicate
> that the counter doesn't exist. However, jstat also prints an unnecessary
> message, which clobbers the output. This message might still be useful for
> debugging, but should only be printed when jstat is running with debug messages
> enabled (-J-DExpressionResolver.debug=true).
>
> Webrev: http://cr.openjdk.java.net/~pliden/8191846/webrev.0/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8191846
> Testing: hs-tier1, hs-tier2
>
> /Per
Reply | Threaded
Open this post in threaded view
|

Re: 8191846: jstat prints debug message when debugging is disabled

Per Liden
Thanks Robbin!

/Per

On 2017-11-27 10:41, Robbin Ehn wrote:

> Looks good, Robbin
>
> On 11/24/2017 09:01 AM, Per Liden wrote:
>> Hi,
>>
>> jstat is designed to handle the case where a perf counter doesn't
>> exits. In the output jstat will then print a "-" instead of the perf
>> counter value to indicate that the counter doesn't exist. However,
>> jstat also prints an unnecessary message, which clobbers the output.
>> This message might still be useful for debugging, but should only be
>> printed when jstat is running with debug messages enabled
>> (-J-DExpressionResolver.debug=true).
>>
>> Webrev: http://cr.openjdk.java.net/~pliden/8191846/webrev.0/
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8191846
>> Testing: hs-tier1, hs-tier2
>>
>> /Per