RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

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

RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sundararajan Athijegannathan
In reply to this post by Sharath Ballal
+1

-Sundar

On 21/11/17, 12:26 PM, Sharath Ballal wrote:

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sundararajan Athijegannathan
In reply to this post by Sharath Ballal
+1

-Sundar

On 21/11/17, 3:26 PM, Sharath Ballal wrote:

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

Thanks Sundar.

 

 

Thanks,

Sharath

 

 

From: Sundararajan Athijegannathan
Sent: Tuesday, November 21, 2017 7:38 PM
To: [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

+1

-Sundar

On 21/11/17, 3:26 PM, Sharath Ballal wrote:

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

Can I get one more review please ?

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Wednesday, November 22, 2017 2:53 PM
To: Sundararajan Athijegannathan; [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Thanks Sundar.

 

 

Thanks,

Sharath

 

 

From: Sundararajan Athijegannathan
Sent: Tuesday, November 21, 2017 7:38 PM
To: [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

+1

-Sundar

On 21/11/17, 3:26 PM, Sharath Ballal wrote:

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 

Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Chris Plummer
Hi Sharath,

Do we have any other examples of testing SA tool classes in this manner? I couldn't find any. I don't see any tests that directly test the classes in the sun/jvm/hotspot/tools. Instead I think we rely on testing the tools that use them such as jstack, pstack, and clhsdb. The only reference to ClassDump I could find is  by the clhsdb buildreplayjars command.

I guess was this is leading to is do we even officially support running ClassDump stand alone as you are doing when you reproduce this bug? If so, are there other tool classes that we also need better testing of.

thanks,

Chris

On 11/27/17 10:15 PM, Sharath Ballal wrote:

Can I get one more review please ?

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Wednesday, November 22, 2017 2:53 PM
To: Sundararajan Athijegannathan; [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Thanks Sundar.

 

 

Thanks,

Sharath

 

 

From: Sundararajan Athijegannathan
Sent: Tuesday, November 21, 2017 7:38 PM
To: [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

+1

-Sundar

On 21/11/17, 3:26 PM, Sharath Ballal wrote:

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath

 

 


Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Jini George
In reply to this post by Sharath Ballal
Looks good to me, Sharath. Just a nit. In the following file:

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/PackageNameFilter.java.sdiff.html

The check for the package list being null can be done before populating
klassName with the replaced '/'s.

Thanks,
Jini (Not a Reviewer).

On 11/28/2017 11:45 AM, Sharath Ballal wrote:

> Can I get one more review please ?
>
> Thanks,
>
> Sharath
>
> *From:*Sharath Ballal
> *Sent:* Wednesday, November 22, 2017 2:53 PM
> *To:* Sundararajan Athijegannathan; [hidden email]
> *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java
> program generates NullPointerException
>
> Thanks Sundar.
>
> Thanks,
>
> Sharath
>
> *From:*Sundararajan Athijegannathan
> *Sent:* Tuesday, November 21, 2017 7:38 PM
> *To:* [hidden email]
> <mailto:[hidden email]>
> *Subject:* Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java
> program generates NullPointerException
>
> +1
>
> -Sundar
>
> On 21/11/17, 3:26 PM, Sharath Ballal wrote:
>
>     I have made minor modification to the test (added @bug and removed
>     @modules).
>
>     The revised webrev is
>
>     http://cr.openjdk.java.net/~sballal/8184982/webrev.01/
>     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.01/>
>
>     Thanks,
>
>     Sharath
>
>     *From:* Sharath Ballal
>     *Sent:* Tuesday, November 21, 2017 12:27 PM
>     *To:* [hidden email]
>     <mailto:[hidden email]>
>     *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple
>     java program generates NullPointerException
>
>     Gentle reminder.
>
>     Thanks,
>
>     Sharath
>
>     *From:* Sharath Ballal
>     *Sent:* Tuesday, November 14, 2017 10:31 AM
>     *To:* [hidden email]
>     <mailto:[hidden email]>
>     *Subject:* RFR: JDK-8184982 - SA: Running ClassDump on a simple java
>     program generates NullPointerException
>
>     Hello,
>
>     Pls review the code changes and testcase for the following issue.
>
>     Bug ID: https://bugs.openjdk.java.net/browse/JDK-8184982
>
>     Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/
>     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.00/>
>
>     Thanks,
>
>     Sharath
>
Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal

Thanks Jini.  Updated webrev is at

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.02/

 

Thanks,

Sharath

 

 

-----Original Message-----
From: Jini George
Sent: Wednesday, November 29, 2017 2:04 PM
To: Sharath Ballal; [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Looks good to me, Sharath. Just a nit. In the following file:

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/PackageNameFilter.java.sdiff.html

 

The check for the package list being null can be done before populating klassName with the replaced '/'s.

 

Thanks,

Jini (Not a Reviewer).

 

On 11/28/2017 11:45 AM, Sharath Ballal wrote:

> Can I get one more review please ?

>

> Thanks,

>

> Sharath

>

> *From:*Sharath Ballal

> *Sent:* Wednesday, November 22, 2017 2:53 PM

> *To:* Sundararajan Athijegannathan;

> [hidden email]

> *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple

> java program generates NullPointerException

>

> Thanks Sundar.

>

> Thanks,

>

> Sharath

>

> *From:*Sundararajan Athijegannathan

> *Sent:* Tuesday, November 21, 2017 7:38 PM

> *To:* [hidden email]

> <[hidden email]>

> *Subject:* Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple

> java program generates NullPointerException

>

> +1

>

> -Sundar

>

> On 21/11/17, 3:26 PM, Sharath Ballal wrote:

>

>     I have made minor modification to the test (added @bug and removed

>     @modules).

>

>     The revised webrev is

>

>     http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

>     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.01/>

>

>     Thanks,

>

>     Sharath

>

>     *From:* Sharath Ballal

>     *Sent:* Tuesday, November 21, 2017 12:27 PM

>     *To:* [hidden email]

>     <[hidden email]>

>     *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple

>     java program generates NullPointerException

>

>     Gentle reminder.

>

>     Thanks,

>

>     Sharath

>

>     *From:* Sharath Ballal

>     *Sent:* Tuesday, November 14, 2017 10:31 AM

>     *To:* [hidden email]

>     <[hidden email]>

>     *Subject:* RFR: JDK-8184982 - SA: Running ClassDump on a simple java

>     program generates NullPointerException

>

>     Hello,

>

>     Pls review the code changes and testcase for the following issue.

>

>     Bug ID: https://bugs.openjdk.java.net/browse/JDK-8184982

>

>     Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

>     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.00/>

>

>     Thanks,

>

>     Sharath

>

 

Reply | Threaded
Open this post in threaded view
|

Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Jini George
Looks good to me.

Thanks,
Jini.

On 11/29/2017 3:06 PM, Sharath Ballal wrote:

> Thanks Jini.  Updated webrev is at
>
> http://cr.openjdk.java.net/~sballal/8184982/webrev.02/
>
> Thanks,
>
> Sharath
>
> -----Original Message-----
> From: Jini George
> Sent: Wednesday, November 29, 2017 2:04 PM
> To: Sharath Ballal; [hidden email]
> Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java
> program generates NullPointerException
>
> Looks good to me, Sharath. Just a nit. In the following file:
>
> http://cr.openjdk.java.net/~sballal/8184982/webrev.01/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/PackageNameFilter.java.sdiff.html
>
> The check for the package list being null can be done before populating
> klassName with the replaced '/'s.
>
> Thanks,
>
> Jini (Not a Reviewer).
>
> On 11/28/2017 11:45 AM, Sharath Ballal wrote:
>
>  > Can I get one more review please ?
>
>  >
>
>  > Thanks,
>
>  >
>
>  > Sharath
>
>  >
>
>  > *From:*Sharath Ballal
>
>  > *Sent:* Wednesday, November 22, 2017 2:53 PM
>
>  > *To:* Sundararajan Athijegannathan;
>
>  > [hidden email]
> <mailto:[hidden email]>
>
>  > *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple
>
>  > java program generates NullPointerException
>
>  >
>
>  > Thanks Sundar.
>
>  >
>
>  > Thanks,
>
>  >
>
>  > Sharath
>
>  >
>
>  > *From:*Sundararajan Athijegannathan
>
>  > *Sent:* Tuesday, November 21, 2017 7:38 PM
>
>  > *To:* [hidden email]
> <mailto:[hidden email]>
>
>  > <mailto:[hidden email]>
>
>  > *Subject:* Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple
>
>  > java program generates NullPointerException
>
>  >
>
>  > +1
>
>  >
>
>  > -Sundar
>
>  >
>
>  > On 21/11/17, 3:26 PM, Sharath Ballal wrote:
>
>  >
>
>  >     I have made minor modification to the test (added @bug and removed
>
>  >     @modules).
>
>  >
>
>  >     The revised webrev is
>
>  >
>
>  > http://cr.openjdk.java.net/~sballal/8184982/webrev.01/
>
>  >     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.01/>
>
>  >
>
>  >     Thanks,
>
>  >
>
>  >     Sharath
>
>  >
>
>  >     *From:* Sharath Ballal
>
>  >     *Sent:* Tuesday, November 21, 2017 12:27 PM
>
>  >     *To:* [hidden email]
> <mailto:[hidden email]>
>
>  >     <mailto:[hidden email]>
>
>  >     *Subject:* RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple
>
>  >     java program generates NullPointerException
>
>  >
>
>  >     Gentle reminder.
>
>  >
>
>  >     Thanks,
>
>  >
>
>  >     Sharath
>
>  >
>
>  >     *From:* Sharath Ballal
>
>  >     *Sent:* Tuesday, November 14, 2017 10:31 AM
>
>  >     *To:* [hidden email]
> <mailto:[hidden email]>
>
>  >     <mailto:[hidden email]>
>
>  >     *Subject:* RFR: JDK-8184982 - SA: Running ClassDump on a simple java
>
>  >     program generates NullPointerException
>
>  >
>
>  >     Hello,
>
>  >
>
>  >     Pls review the code changes and testcase for the following issue.
>
>  >
>
>  >     Bug ID: https://bugs.openjdk.java.net/browse/JDK-8184982
>
>  >
>
>  >     Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/
>
>  >     <http://cr.openjdk.java.net/%7Esballal/8184982/webrev.00/>
>
>  >
>
>  >     Thanks,
>
>  >
>
>  >     Sharath
>
>  >
>
Reply | Threaded
Open this post in threaded view
|

RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

Sharath Ballal
In reply to this post by Chris Plummer

Hi Chris,

 

 

Thanks,

Sharath

 

 

From: Chris Plummer
Sent: Wednesday, November 29, 2017 3:05 AM
To: Sharath Ballal; [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hi Sharath,

Do we have any other examples of testing SA tool classes in this manner? I couldn't find any. I don't see any tests that directly test the classes in the sun/jvm/hotspot/tools. Instead I think we rely on testing the tools that use them such as jstack, pstack, and clhsdb. The only reference to ClassDump I could find is  by the clhsdb buildreplayjars command.

[Sharath Ballal] Currently there are no tests to test the tools.  We are writing tests for SA and as part of it we will write tests for other SA tools as well.


I guess was this is leading to is do we even officially support running ClassDump stand alone as you are doing when you reproduce this bug? If so, are there other tool classes that we also need better testing of.

[Sharath Ballal]  I am not sure about the support.  But we are trying to write testcases for the code that is present so that we are testing it.

 

I will send a separate mail with wiki links to our current SA testing strategy.



thanks,

Chris

On 11/27/17 10:15 PM, Sharath Ballal wrote:

Can I get one more review please ?

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Wednesday, November 22, 2017 2:53 PM
To: Sundararajan Athijegannathan; [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Thanks Sundar.

 

 

Thanks,

Sharath

 

 

From: Sundararajan Athijegannathan
Sent: Tuesday, November 21, 2017 7:38 PM
To: [hidden email]
Subject: Re: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

+1

-Sundar

On 21/11/17, 3:26 PM, Sharath Ballal wrote:

I have made minor modification to the test (added @bug and removed @modules).

The revised webrev is

 

http://cr.openjdk.java.net/~sballal/8184982/webrev.01/

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 21, 2017 12:27 PM
To: [hidden email]
Subject: RE: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Gentle reminder.

 

 

Thanks,

Sharath

 

 

From: Sharath Ballal
Sent: Tuesday, November 14, 2017 10:31 AM
To: [hidden email]
Subject: RFR: JDK-8184982 - SA: Running ClassDump on a simple java program generates NullPointerException

 

Hello,

 

Pls review the code changes and testcase for the following issue.

 

Bug ID:  https://bugs.openjdk.java.net/browse/JDK-8184982

 

Webrev: http://cr.openjdk.java.net/~sballal/8184982/webrev.00/

 

Thanks,

Sharath