Bug 473978

Summary: Add support for checking of cpu state in code translation
Product: [Developer tools] valgrind Reporter: JojoR <rjiejie>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: jlp, pjfloyd
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: v1-0001-VEX-Add-code-basic-block-flag-support.patch
v1-0002-transtab-Add-code-basic-block-flag-support.patch
v1-0003-scheduler-Add-code-basic-block-flag-support.patch
v1-0001-VEX-Add-code-basic-block-flag-support.patch
v1-0002-transtab-Add-code-basic-block-flag-support.patch
v1-0003-scheduler-Add-code-basic-block-flag-support.patch

Description JojoR 2023-08-31 07:59:35 UTC
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
Comment 1 JojoR 2023-08-31 09:30:57 UTC
Created attachment 161300 [details]
v1-0001-VEX-Add-code-basic-block-flag-support.patch
Comment 2 JojoR 2023-08-31 09:31:30 UTC
Created attachment 161301 [details]
v1-0002-transtab-Add-code-basic-block-flag-support.patch
Comment 3 JojoR 2023-08-31 09:32:01 UTC
Created attachment 161302 [details]
v1-0003-scheduler-Add-code-basic-block-flag-support.patch
Comment 4 JojoR 2023-08-31 09:38:55 UTC
authors:
 - zhaomingxin@linux.alibaba.com
 - rjiejie@linux.alibaba.com
Comment 5 JojoR 2023-08-31 09:50:32 UTC
Created attachment 161303 [details]
v1-0001-VEX-Add-code-basic-block-flag-support.patch
Comment 6 JojoR 2023-08-31 09:51:20 UTC
Created attachment 161304 [details]
v1-0002-transtab-Add-code-basic-block-flag-support.patch
Comment 7 JojoR 2023-08-31 09:51:46 UTC
Created attachment 161305 [details]
v1-0003-scheduler-Add-code-basic-block-flag-support.patch