问题描述
我想知道gem5中是否有一种方法可以区分不同的逻辑(软件)线程.我正在尝试为每个逻辑线程收集一些统计信息,到目前为止,我在gem5中只能找到对物理线程的访问.我知道逻辑线程是操作系统的责任,但无论如何gem5都可以访问逻辑线程ID.
一种选择是将线程固定到内核,但这仅在内核数量至少等于逻辑线程数量的情况下才有效.但是,我将需要进行一些实验,其中逻辑线程的数量超过内核的数量,在这种情况下,会将多个逻辑线程分配给同一内核,为了区分它们,我需要逻辑线程ID./p>
非常感谢您.
对于arm64完整系统Linux,我相信,如果使用CONFIG_PID_IN_CONTEXTIDR
构建内核,则每个进程都将使用唯一的CONTEXTIDR_EL1
运行,其显示为--debug-flag Exec
.
对于其他拱门,请参阅对邮件列表问题的答复: https://www.mail-archive.com/[email protected]/msg16228.html
请始终澄清您是在使用完整系统还是在模拟syscall仿真,因为这可能会有所不同,因为答复可能会大不相同.
I was wondering if there is a way to differentiate between different logical (software) threads in gem5. I am trying to collect some stats for each logical thread and so far all I could find in gem5 is access to physical threads. I know that logical threads is the responsibility of the OS but is there anyway for gem5 to access the logical thread ID.
One option is to pin threads to cores but this only works if the number of cores is at least equal to the number of logical threads. However, I will need to run some experiments where the number of logical threads exceed the number of cores, in which case, multiple logical threads will be assigned to the same core and in order to differentiate between them I need the logical thread ID.
Thank you very much in advance.
For arm64 full system Linux, I believe that if you build the kernel with CONFIG_PID_IN_CONTEXTIDR
, then each process runs with an unique CONTEXTIDR_EL1
, which shows on --debug-flag Exec
.
For other archs, see the replies to the mailing list question: https://www.mail-archive.com/[email protected]/msg16228.html
Please always clarify if you are working on full system, or syscall emulation if that seems to make a difference, as the replies can be quite different.
这篇关于在gem5中访问逻辑(软件)线程ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!