Bug 473978 - Add support for checking of cpu state in code translation
Summary: Add support for checking of cpu state in code translation
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-31 07:59 UTC by JojoR
Modified: 2024-12-23 20:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
v1-0001-VEX-Add-code-basic-block-flag-support.patch (788 bytes, application/mbox)
2023-08-31 09:30 UTC, JojoR
Details
v1-0002-transtab-Add-code-basic-block-flag-support.patch (16.43 KB, application/mbox)
2023-08-31 09:31 UTC, JojoR
Details
v1-0003-scheduler-Add-code-basic-block-flag-support.patch (6.75 KB, application/mbox)
2023-08-31 09:32 UTC, JojoR
Details
v1-0001-VEX-Add-code-basic-block-flag-support.patch (788 bytes, text/plain)
2023-08-31 09:50 UTC, JojoR
Details
v1-0002-transtab-Add-code-basic-block-flag-support.patch (16.43 KB, text/plain)
2023-08-31 09:51 UTC, JojoR
Details
v1-0003-scheduler-Add-code-basic-block-flag-support.patch (6.75 KB, text/plain)
2023-08-31 09:51 UTC, JojoR
Details

Note You need to log in before you can comment on or make changes to this bug.
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