Skip to content
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

Enable logging after boot #29

Open
tomhepworth opened this issue Dec 18, 2023 · 1 comment
Open

Enable logging after boot #29

tomhepworth opened this issue Dec 18, 2023 · 1 comment

Comments

@tomhepworth
Copy link

Hello, I have question about enabling logging in the simulator.

I would like to boot into linux with instruction logging disabled, and only log for a test binary within the simulator. Is there any mechanism to support this?

My current plan is to hack spike to listen for some hint instructions to toggle logging, then I will wrap my test binary in a script which executes these hint instructions.

Thanks :)

@Phantom1003
Copy link
Member

Phantom1003 commented Dec 22, 2023

It can be quite challenging to isolate a user space program log within a Linux environment. This is because these programs share the same virtual address space. You cannot simply identify your target program by addresses. Even if you add a wrapper, your program may be interrupted and not executed continuously. As a result, your log will contain logs from the kernel and other processes, which means you may also need to hack the kernel. If your test case doesn't require complex syscalls, maybe you can use the proxy kernel from riscv-pk to simplify your environment.

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

No branches or pull requests

2 participants