RFR: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522

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

RFR: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522

Андрей Вершинин
 Hello everybody,

My name is Andrey Vershinin, I've chosen to fix JDK-8254239 as my first
contribution to the project. I'm a Java developer, with some C++ knowledge
(in the process of improving it).
My goal is to gain a deeper understanding of the inner workings of the
platform I'm interested in, its concepts and the code itself, and
contribute to the best of my ability.
The bug I've selected is a 'starter' one, to get involved in the process.
The patch is attached below.

Thanks,
Andrey

===================================================================
diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
06348dfcae0b6b82970e8c56391396affd311f90)
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
e635cee530e414503d6e84261ce636123d282ee9)
@@ -50,10 +50,6 @@
 class G1SurvivorRegions;
 class ThreadClosure;

-PRAGMA_DIAG_PUSH
-// warning C4522: multiple assignment operators specified
-PRAGMA_DISABLE_MSVC_WARNING(4522)
-
 // This is a container class for either an oop or a continuation address
for
 // mark stack entries. Both are pushed onto the mark stack.
 class G1TaskQueueEntry {
@@ -89,8 +85,6 @@
   bool is_null() const { return _holder == NULL; }
 };

-PRAGMA_DIAG_POP
-
 typedef GenericTaskQueue<G1TaskQueueEntry, mtGC> G1CMTaskQueue;
 typedef GenericTaskQueueSet<G1CMTaskQueue, mtGC> G1CMTaskQueueSet;
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522

Kim Barrett

> On Feb 17, 2021, at 8:42 PM, Андрей Вершинин <[hidden email]> wrote:
>
> Hello everybody,
>
> My name is Andrey Vershinin, I've chosen to fix JDK-8254239 as my first
> contribution to the project. I'm a Java developer, with some C++ knowledge
> (in the process of improving it).
> My goal is to gain a deeper understanding of the inner workings of the
> platform I'm interested in, its concepts and the code itself, and
> contribute to the best of my ability.
> The bug I've selected is a 'starter' one, to get involved in the process.
> The patch is attached below.

The normal way to make openjdk changes now is via github pull
requests, rather than patches in email. But there are some preliminary
steps as well. In particular, have you signed the OCA? I suggest you
take a look here:

https://openjdk.java.net/guide/
https://openjdk.java.net/guide/#i-have-a-patch-what-do-i-do

When you get to the point of finding a sponser, I can do that.

> Thanks,
> Andrey
>
> ===================================================================
> diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
> b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
> --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
> 06348dfcae0b6b82970e8c56391396affd311f90)
> +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
> e635cee530e414503d6e84261ce636123d282ee9)
> @@ -50,10 +50,6 @@
> class G1SurvivorRegions;
> class ThreadClosure;
>
> -PRAGMA_DIAG_PUSH
> -// warning C4522: multiple assignment operators specified
> -PRAGMA_DISABLE_MSVC_WARNING(4522)
> -
> // This is a container class for either an oop or a continuation address
> for
> // mark stack entries. Both are pushed onto the mark stack.
> class G1TaskQueueEntry {
> @@ -89,8 +85,6 @@
>   bool is_null() const { return _holder == NULL; }
> };
>
> -PRAGMA_DIAG_POP
> -
> typedef GenericTaskQueue<G1TaskQueueEntry, mtGC> G1CMTaskQueue;
> typedef GenericTaskQueueSet<G1CMTaskQueue, mtGC> G1CMTaskQueueSet;

Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522

Андрей Вершинин
Hello Kim,

I've signed the OCA with my Github username written in. PR:
https://github.com/openjdk/jdk/pull/2646
I would be grateful if you could sponsor this


пт, 19 февр. 2021 г. в 17:01, Kim Barrett <[hidden email]>:

>
> > On Feb 17, 2021, at 8:42 PM, Андрей Вершинин <[hidden email]>
> wrote:
> >
> > Hello everybody,
> >
> > My name is Andrey Vershinin, I've chosen to fix JDK-8254239 as my first
> > contribution to the project. I'm a Java developer, with some C++
> knowledge
> > (in the process of improving it).
> > My goal is to gain a deeper understanding of the inner workings of the
> > platform I'm interested in, its concepts and the code itself, and
> > contribute to the best of my ability.
> > The bug I've selected is a 'starter' one, to get involved in the process.
> > The patch is attached below.
>
> The normal way to make openjdk changes now is via github pull
> requests, rather than patches in email. But there are some preliminary
> steps as well. In particular, have you signed the OCA? I suggest you
> take a look here:
>
> https://openjdk.java.net/guide/
> https://openjdk.java.net/guide/#i-have-a-patch-what-do-i-do
>
> When you get to the point of finding a sponser, I can do that.
>
> > Thanks,
> > Andrey
> >
> > ===================================================================
> > diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
> > b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
> > --- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
> > 06348dfcae0b6b82970e8c56391396affd311f90)
> > +++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp (revision
> > e635cee530e414503d6e84261ce636123d282ee9)
> > @@ -50,10 +50,6 @@
> > class G1SurvivorRegions;
> > class ThreadClosure;
> >
> > -PRAGMA_DIAG_PUSH
> > -// warning C4522: multiple assignment operators specified
> > -PRAGMA_DISABLE_MSVC_WARNING(4522)
> > -
> > // This is a container class for either an oop or a continuation address
> > for
> > // mark stack entries. Both are pushed onto the mark stack.
> > class G1TaskQueueEntry {
> > @@ -89,8 +85,6 @@
> >   bool is_null() const { return _holder == NULL; }
> > };
> >
> > -PRAGMA_DIAG_POP
> > -
> > typedef GenericTaskQueue<G1TaskQueueEntry, mtGC> G1CMTaskQueue;
> > typedef GenericTaskQueueSet<G1CMTaskQueue, mtGC> G1CMTaskQueueSet;
>
>