Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Caroline Tice via Gcc-patches
On Tue, Oct 11, 2022 at 7:52 PM Lulu Cheng wrote: > > 在 2022/10/12 上午4:57, Caroline Tice 写道: > > I think that if VTV_PAGE_SIZE is not set to the actual size being used by > the system, it could result in some unexpected failures. I believe the > right thing to do in this case, since the size

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Lulu Cheng
在 2022/10/12 上午4:57, Caroline Tice 写道: I think that if VTV_PAGE_SIZE is not set to the actual size being used by the system,  it could result in some unexpected failures.  I believe the right thing to do in this case, since the size may vary, is to get the actual size being used by the

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Caroline Tice via Gcc-patches
I think that if VTV_PAGE_SIZE is not set to the actual size being used by the system, it could result in some unexpected failures. I believe the right thing to do in this case, since the size may vary, is to get the actual size being used by the system and use that in the definition of

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-11 Thread Xi Ruoyao via Gcc-patches
On Mon, 2022-10-10 at 10:49 -0700, Caroline Tice via Gcc-patches wrote: > Is "if (VTV_PAGE_SIZE != sysconf (_SC_PAGE_SIZE))" going to fail for > loongarch? Because LoongArch systems may have 4KB, 16KB, or 64KB pages. > If not, why do you need to insert anything here at all?  If so, > perhaps you

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-10-10 Thread Caroline Tice via Gcc-patches
On Tue, Sep 27, 2022 at 3:04 AM Lulu Cheng wrote: > > v1 - > v2: > > 1. When the macro __loongarch_lp64 is defined, the VTV_PAGE_SIZE is set to > 64K. > 2. In the vtv_malloc.cc file __vtv_malloc_init function, it does not check >whether VTV_PAGE_SIZE is equal to the system page size, if the

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-09-28 Thread Lulu Cheng
在 2022/9/27 下午7:44, Xi Ruoyao 写道: On Tue, 2022-09-27 at 15:49 +0800, Lulu Cheng wrote:  #if defined (__CYGWIN__) || defined (__MINGW32__)    if (VTV_PAGE_SIZE != sysconf_SC_PAGE_SIZE()) +#elif defined (__loongarch_lp64) +  /* I think that under the LoongArch 64-bit system, VTV_PAGE_SIZE is

Re: [PATCH v2] LoongArch: Libvtv add loongarch support.

2022-09-27 Thread Xi Ruoyao via Gcc-patches
On Tue, 2022-09-27 at 15:49 +0800, Lulu Cheng wrote: >  #if defined (__CYGWIN__) || defined (__MINGW32__) >    if (VTV_PAGE_SIZE != sysconf_SC_PAGE_SIZE()) > +#elif defined (__loongarch_lp64) > +  /* I think that under the LoongArch 64-bit system, VTV_PAGE_SIZE is set > + to the maximum value

[PATCH v2] LoongArch: Libvtv add loongarch support.

2022-09-27 Thread Lulu Cheng
v1 - > v2: 1. When the macro __loongarch_lp64 is defined, the VTV_PAGE_SIZE is set to 64K. 2. In the vtv_malloc.cc file __vtv_malloc_init function, it does not check whether VTV_PAGE_SIZE is equal to the system page size, if the macro __loongarch_lp64 is defined. All regression tests of