10000 [GDBJIT] Display DynaRec info in source file by ksco · Pull Request #2179 · ptitSeb/box64 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[GDBJIT] Display DynaRec info in source file #2179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

ksco
Copy link
Collaborator
@ksco ksco commented Dec 20, 2024

gdbjit showcase

@ksco ksco requested a review from ptitSeb December 20, 2024 09:31
if (!box64_dynarec_dump && !box64_dynarec_gdbjit) return;

static char buf[512];
int length = sprintf(buf, "barrier=%d state=%d/%d/%d(%d:%d->%d:%d), %s=%X/%X, use=%X, need=%X/%X, sm=%d(%d/%d)",
Copy link
Owner
@ptitSeb ptitSeb Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were are the colors for regular dump (because there was some color changes in the dump info)?
why not use a have_color variable instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kept down below, see #2179 (comment)

Comment on lines +761 to +762
(box64_dynarec_dump > 1) ? "\e[32m" : "",
(void*)(dyn->native_start + dyn->insts[ninst].address), dyn->insts[ninst].size / 4, ninst, buf, (box64_dynarec_dump > 1) ? "\e[m" : "");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ptitSeb Colors are kept here.

dynarec_log(LOG_NONE, "->%s", getCacheName(dyn->insts[ninst].n.neoncache[ii].t, dyn->insts[ninst].n.neoncache[ii].n));
}
if (memcmp(dyn->insts[ninst].n.neoncache, dyn->n.neoncache, sizeof(dyn->n.neoncache))) {
length += sprintf(buf + length, " %s(Change:", (box64_dynarec_dump > 1) ? "\e[1;91m" : "");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you get color here, even for gdbjit stuffs. Is that ok?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless one uses DUMP=2 and GDBJIT=1 at the same time, which does not make much sense, there won't be any color, not sure if there is a better way to do this.

if(dyn->insts[ninst].n.combined1 || dyn->insts[ninst].n.combined2)
dynarec_log(LOG_NONE, " %s:%d/%d", dyn->insts[ninst].n.swapped?"SWP":"CMB", dyn->insts[ninst].n.combined1, dyn->insts[ninst].n.combined2);
dynarec_log(LOG_NONE, "%s\n", (box64_dynarec_dump>1)?"\e[m":"");
length += sprintf(buf + length, ")%s", (box64_dynarec_dump > 1) ? "\e[0;32m" : "");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, color attribute again here.

@ksco ksco requested a review from ptitSeb December 20, 2024 11:13
@ptitSeb ptitSeb merged commit 6ac7d7a into ptitSeb:main Dec 20, 2024
26 of 27 checks passed
@ksco ksco deleted the gdbjit branch December 20, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0