Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v8]

2021-10-07 Thread Yumin Qi
On Thu, 7 Oct 2021 06:06:02 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add offset check for _generic_header in populate_header > > LGTM @iklam @calvinccheung Thanks for review! - PR: ht

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v8]

2021-10-07 Thread Yumin Qi
On Thu, 7 Oct 2021 20:30:00 GMT, Calvin Cheung wrote: > I just have one minor comment. It's up to you if you want to change it. Thanks for review --- I will leave as it is now. - PR: https://git.openjdk.java.net/jdk/pull/5768

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v8]

2021-10-07 Thread Calvin Cheung
On Wed, 6 Oct 2021 21:53:30 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is p

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v8]

2021-10-06 Thread Ioi Lam
On Wed, 6 Oct 2021 21:53:30 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is p

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v8]

2021-10-06 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-06 Thread Yumin Qi
On Wed, 6 Oct 2021 17:01:58 GMT, Ioi Lam wrote: >> see above reply. We need read the full _header_size for _header. Also note >> that helper class will delete gen_header when out of scope. > > I see. I think your current code is fine. > > Note that the current code writes the header as a FileMa

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v7]

2021-10-06 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-06 Thread Yumin Qi
On Wed, 6 Oct 2021 04:09:32 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added a helper class to facilitate checking archive > > src/hotspot/share/cds/filemap.cpp line 1099: > >> 1097: lseek(_fd, _

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-06 Thread Ioi Lam
On Wed, 6 Oct 2021 16:44:25 GMT, Yumin Qi wrote: >> src/hotspot/share/cds/filemap.cpp line 1205: >> >>> 1203: } >>> 1204: >>> 1205: _header = (FileMapHeader*)os::malloc(gen_header->_header_size, >>> mtInternal); >> >> There's no need to allocate and read the header again. It's already in

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v6]

2021-10-06 Thread Ioi Lam
On Wed, 6 Oct 2021 17:01:31 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is p

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v6]

2021-10-06 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-06 Thread Yumin Qi
On Wed, 6 Oct 2021 04:15:06 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added a helper class to facilitate checking archive > > src/hotspot/share/cds/filemap.cpp line 1205: > >> 1203: } >> 1204: >>

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-06 Thread Yumin Qi
On Wed, 6 Oct 2021 04:17:16 GMT, Ioi Lam wrote: >> Yumin Qi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Added a helper class to facilitate checking archive > > src/jdk.hotspot.agent/share/native/libsaproc/ps_core_common.c line 369: >

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-05 Thread Ioi Lam
On Tue, 5 Oct 2021 22:32:30 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is p

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v5]

2021-10-05 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v4]

2021-10-04 Thread Ioi Lam
On Mon, 4 Oct 2021 17:50:27 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is p

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v4]

2021-10-04 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v3]

2021-10-04 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v2]

2021-10-01 Thread Calvin Cheung
On Thu, 30 Sep 2021 16:23:34 GMT, Yumin Qi wrote: >> Please review, >> Refactor fundamental CDS FileMapHeader code for reliable reading of basic >> info from shared archive. >> With the change, it makes it possible to read an archive generated by >> different version of hotspot. Also it is

Re: RFR: 8273152: Refactor CDS FileMapHeader loading code [v2]

2021-09-30 Thread Yumin Qi
> Please review, > Refactor fundamental CDS FileMapHeader code for reliable reading of basic > info from shared archive. > With the change, it makes it possible to read an archive generated by > different version of hotspot. Also it is possible to automatically generate a > CDS archive If th

RFR: 8273152: Refactor CDS FileMapHeader loading code

2021-09-30 Thread Yumin Qi
Please review, Refactor fundamental CDS FileMapHeader code for reliable reading of basic info from shared archive. With the change, it makes it possible to read an archive generated by different version of hotspot. Also it is possible to automatically generate a CDS archive If the archive su