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

How can I know the request in gem5 is issued by which process ? #303

Open
claire8967 opened this issue Mar 8, 2024 · 3 comments
Open

How can I know the request in gem5 is issued by which process ? #303

claire8967 opened this issue Mar 8, 2024 · 3 comments

Comments

@claire8967
Copy link

In gem5, I tried to execute three process simultaneously.
And In the DRAMInterface.cc doBurstAccess function, we can know that the Mempacket is the argument.
Is any method that I can know this packet is issued by which process ?

@cirosantilli
Copy link
Owner

Hi,

I don't think there's something built-in that gives the answer immediately.

I don't have the time to look into it specifically, but I'll give an idea.

This type of issue is the prototypical gem5 question: what is causing such or such event?

gem5 is fully event based, one event causes other events and so on. So in principle, it is possible to create an event graph and walk backward to the cause.

So what I would try is through logging and parsing of logs to try and create such an event graph, so that you would be trace "memory IO" events all the way back to "cpu tick events".

Then you also have log which process is running on a given CPU tick. On SE this is easy, on FS you need to understand how the OS represents processes and possibly interpret some registers/parse memory. I don't remember the status of this kind of stuff, but there was already some Linux specific support (e.g. detect crash by symbol), and if there's no thread support, it would be a good addition, though possibly a bit of work.

@claire8967
Copy link
Author

claire8967 commented Mar 10, 2024

Thanks for your reply !
I know what you say but I have problem with how to know the entire event flow in gem5.
Is there any tools that I can use?
And I found that I can get the taskid and the requestid, is these id is related to process id ?

@claire8967
Copy link
Author

Hi,
I think maybe I can use requestorId to differentiate that packet is come from which process.
This article https://www.mail-archive.com/gem5-users@gem5.org/msg21144.html show that requestorId is related to cpu.
and I can use mem_pkt->requestorId() in the function doBusrtAccess to get the information I want.

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