[valgrind] [Bug 468575] Add support for RISC-V

2024-06-21 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468575

--- Comment #19 from JojoR  ---
(In reply to Paul Floyd from comment #18)
> On a machine that is StarFive JH7100 SoC (2x SiFive U74 at 1.20 GHz)
> 
> I have a problem with make check.
> 
> gcc -Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector   -o
> compressed compressed.o  
> compressed.o: in function `test_compressed_10':
> /home/paulf/valgrind-riscv64/none/tests/riscv64/compressed.c:347:(.
> text+0x56d16): dangerous relocation: The addend isn't allowed for
> R_RISCV_GOT_HI20
> collect2: error: ld returned 1 exit status
> make[5]: *** [Makefile:741: compressed] Error 1
> make[5]: Leaving directory '/home/paulf/valgrind-riscv64/none/tests/riscv64'
> make[4]: *** [Makefile:899: check-am] Error 2
> make[4]: Leaving directory '/home/paulf/valgrind-riscv64/none/tests/riscv64'
> make[3]: *** [Makefile:2270: check-recursive] Error 1
> make[3]: Leaving directory '/home/paulf/valgrind-riscv64/none/tests'
> make[2]: *** [Makefile:1101: check-recursive] Error 1
> make[2]: Leaving directory '/home/paulf/valgrind-riscv64/none'
> make[1]: *** [Makefile:926: check-recursive] Error 1
> make[1]: Leaving directory '/home/paulf/valgrind-riscv64'
> make: *** [Makefile:1225: check] Error 2
> 
> Maybe a GCC problem?
> 
> gcc --version
> gcc (Debian 13.2.0-13) 13.2.0

Yes, looks ld met some bugs :(
and I suggest you can get the latest toolchain from here:
https://github.com/riscv-collab/riscv-gnu-toolchain/releases/

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468575] Add support for RISC-V

2024-06-17 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468575

--- Comment #15 from JojoR  ---
(In reply to Paul Floyd from comment #14)
> I built and ran regtest on my github clone of
> https://github.com/petrpavlu/valgrind-riscv64 on FreeBSD amd64.
> 
> There were a couple of unexpected failures in memcheck/tests/freebsd (one of
> the scalars and eventfd2). I'll look into them and also try some more
> platforms.

Good news, thanks for your efforts, hope that will been fixed soon :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468575] Add support for RISC-V

2024-06-16 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468575

--- Comment #13 from JojoR  ---
@Paul Floyd

Has anyone reviewed these patches ?

It has taken long time and there is not any feedback :)

Could we review & push these basic ISAs (rv64gc) implementation first ?
other of extensions like Vector of RISCV depend on this, that will be the next
steps :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 474280] Add Ijk_ExitBB IR for potential critical state

2023-09-07 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=474280

--- Comment #2 from JojoR  ---
authors:
 - zhaoming...@linux.alibaba.com
 - rjie...@linux.alibaba.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 474280] Add Ijk_ExitBB IR for potential critical state

2023-09-07 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=474280

JojoR  changed:

   What|Removed |Added

 Attachment #161502|0   |1
is obsolete||

--- Comment #1 from JojoR  ---
Created attachment 161503
  --> https://bugs.kde.org/attachment.cgi?id=161503=edit
v1-0001-VEX-Add-Ijk_ExitBB-IR-for-potential-critical-state-c.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 474280] New: Add Ijk_ExitBB IR for potential critical state

2023-09-07 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=474280

Bug ID: 474280
   Summary: Add Ijk_ExitBB IR for potential critical state
Classification: Developer tools
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Other
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: vex
  Assignee: jsew...@acm.org
  Reporter: rjie...@gmail.com
  Target Milestone: ---

Created attachment 161502
  --> https://bugs.kde.org/attachment.cgi?id=161502=edit
v1-0001-VEX-Add-Ijk_ExitBB-IR-for-potential-critical-state-c.patch

Generally we use Ijk_Boring in most jump instructions,
and some backends use this IR to make BB optimization 'chaining' in instruction
selection stage.

For some special ISAs like RISC-V vector [1], vsetvl/vsetvli instruction will
set VTYPE/VL CSRs
which are depended by next BB, so we add this new Ijk_ExitBB IR to exit BB
without any optimization.

[1] https://github.com/riscv/riscv-v-spec

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #7 from JojoR  ---
Created attachment 161305
  --> https://bugs.kde.org/attachment.cgi?id=161305=edit
v1-0003-scheduler-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #6 from JojoR  ---
Created attachment 161304
  --> https://bugs.kde.org/attachment.cgi?id=161304=edit
v1-0002-transtab-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

JojoR  changed:

   What|Removed |Added

 Attachment #161300|0   |1
is obsolete||
 Attachment #161301|0   |1
is obsolete||
 Attachment #161302|0   |1
is obsolete||

--- Comment #5 from JojoR  ---
Created attachment 161303
  --> https://bugs.kde.org/attachment.cgi?id=161303=edit
v1-0001-VEX-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #4 from JojoR  ---
authors:
 - zhaoming...@linux.alibaba.com
 - rjie...@linux.alibaba.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #3 from JojoR  ---
Created attachment 161302
  --> https://bugs.kde.org/attachment.cgi?id=161302=edit
v1-0003-scheduler-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #2 from JojoR  ---
Created attachment 161301
  --> https://bugs.kde.org/attachment.cgi?id=161301=edit
v1-0002-transtab-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

--- Comment #1 from JojoR  ---
Created attachment 161300
  --> https://bugs.kde.org/attachment.cgi?id=161300=edit
v1-0001-VEX-Add-code-basic-block-flag-support.patch

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 473978] New: Add support for checking of cpu state in code translation

2023-08-31 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=473978

Bug ID: 473978
   Summary: Add support for checking of cpu state in code
translation
Classification: Developer tools
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Other
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: jsew...@acm.org
  Reporter: rjie...@gmail.com
  Target Milestone: ---

valgrind buffered translated codes in "transtab", and reuse these codes
directly if next PC is same as these code.

there is a limit for this design, every code block must have enough instruction
information in current code block.

In other ISAs like RISCV Vector [1], current instruction codes depend other
state of CSRs like VTYPE/VL,
only PC information is not enough to judge that valgrind should reuse directly
buffered code or not.

we need to add cpu state in code translation, and save state into "transtab".

[1] https://github.com/riscv/riscv-v-spec

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468979] Add support for RISC-V vector instructions

2023-08-30 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468979

--- Comment #1 from JojoR  ---
Hi,

We are glad to open source RVV implementation here:

https://github.com/rjiejie/valgrind-riscv64

4 kinds extra ISAs were added in this repo:

RV64Zfh : Half-precision floating-point
RV64Xthead [1] : T-HEAD vendor extension for RV64G
RV64V0p7 [2] : Vector 0.7.1
RV64V [3] : Vector 1.0

[1] https://github.com/T-head-Semi/thead-extension-spec
[2] https://github.com/riscv/riscv-v-spec/releases/tag/0.7.1
[3] https://github.com/riscv/riscv-v-spec/releases/tag/v1.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468575] Add support for RISC-V

2023-06-25 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468575

--- Comment #11 from JojoR  ---
@Paul Floyd

Has anyone reviewed these patches ?

It has taken two months and there is not any feedback :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 383010] Add support for AVX-512 instructions

2023-04-25 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=383010

JojoR  changed:

   What|Removed |Added

 CC||rjie...@gmail.com

--- Comment #88 from JojoR  ---
Excellent work, it's a long time :)

Is there any schedule for upstreaming about this feature ?
these patches looks like a prototype implementation ?

I opened another thread about RISC-V vector, some issues should be
common in VEX or plugin Memcheck, even more vector ISA generator :)
Any suggestions for these ? @Tanya @Julian Seward

BTW, is there anyone interested in ARM's SVE or RISC-V vector ?
See more details from https://bugs.kde.org/show_bug.cgi?id=468979

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468979] New: Add support for RISC-V vector instructions

2023-04-25 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468979

Bug ID: 468979
   Summary: Add support for RISC-V vector instructions
Classification: Developer tools
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Linux
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: vex
  Assignee: jsew...@acm.org
  Reporter: rjie...@gmail.com
  Target Milestone: ---

We consider to add RVV/Vector [1] feature in valgrind, there are some
challenges.
RVV like ARM's SVE [2] programming model, it's scalable/VLA, that means the
vector length is agnostic.
ARM's SVE is not supported in valgrind :(

See more details from RFC [3]

[1] https://github.com/riscv/riscv-v-spec
[2]
https://community.arm.com/arm-research/b/articles/posts/the-arm-scalable-vector-extension-sve
[3]
https://sourceforge.net/p/valgrind/mailman/valgrind-developers/thread/84b7a55c-1868-ca14-2626-ffb88925741a%40linux.alibaba.com/#msg37834524

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 468575] Add support for RISC-V

2023-04-19 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=468575

JojoR  changed:

   What|Removed |Added

 CC||rjie...@gmail.com

--- Comment #10 from JojoR  ---
(In reply to Petr Pavlu from comment #9)
> (In reply to Paul Floyd from comment #8)
> > hginfo fails on several systems
> > TLS is, well, tricky
> > 
> > Are the other failures "reaonable"?
> 
> > memcheck/tests/sh-mem-random (stdout)
> > memcheck/tests/sh-mem-random (stderr)
> 
> Another unexpected mmap() failure.

>From our investigation, high address mmap is not supported by some riscv
board/os if it support feature "Sv39" only,
so it is reasonable also :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 467839] New: Gdbserver: Improve compatibility of library directory name

2023-03-26 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=467839

Bug ID: 467839
   Summary: Gdbserver: Improve compatibility of library directory
name
Classification: Developer tools
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Other
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: jsew...@acm.org
  Reporter: rjie...@gmail.com
  Target Milestone: ---

Created attachment 157620
  --> https://bugs.kde.org/attachment.cgi?id=157620=edit
0001-Gdbserver-Improve-compatibility-of-library-directory.patch

Some linux os make softlink from customized directory like lib64xxx into
standard system lib64 directory,
we could improve compatibility for these cases, see Attachment :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 467036] Add time cost statistics for Regtest

2023-03-07 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=467036

JojoR  changed:

   What|Removed |Added

 CC||rjie...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 467036] New: Add time cost statistics for Regtest

2023-03-07 Thread JojoR
https://bugs.kde.org/show_bug.cgi?id=467036

Bug ID: 467036
   Summary: Add time cost statistics for Regtest
Classification: Developer tools
   Product: valgrind
   Version: unspecified
  Platform: Other
OS: Other
Status: REPORTED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: jsew...@acm.org
  Reporter: rjie...@gmail.com
  Target Milestone: ---

Created attachment 157099
  --> https://bugs.kde.org/attachment.cgi?id=157099=edit
0001-Regtest-add-time-cost-statistics.patch

This is a small improved patch for regtest,
some testers hope that valgrind could collect every test modules/dirs time
costs
for helping resource evaluation :)

-- 
You are receiving this mail because:
You are watching all bug changes.