So, I tried adding this patch to kernels 4.3 and 4.8.13. Both kernels
compile successfully but then I run into problems in gem5. Here is what
happens:

1- Kernel 4.3:
When curThreadInfo() gets called on a context switch it gives this error
"panic:curThreadInfo() not implemented for this ISA"

2- Kernel 4.8.13:
When curTaskPID() gets called on a context switch it gives this error
"panic: vtophys page walk returned fault"

Also, I don't think I mentioned this before. I am running full system
simulation with X86 cores.


On Sat, Jan 12, 2019 at 12:17 PM Paul Rosenfeld (prosenfeld) <
prosenf...@micron.com> wrote:

> You’ll need to build a kernel with the extra annotations. I’m not sure if
> they are supported in the latest kernels but I know it was supported in
> v4.3. Here is the commit that adds those symbols:
> https://github.com/gem5/linux-arm-gem5-legacy/commit/516ba2d255b502b1dad07662bd18110f3bf37b1b
>
>
>
> *From:* gem5-users [mailto:gem5-users-boun...@gem5.org] *On Behalf Of *Shehab
> Elsayed
> *Sent:* Friday, January 11, 2019 10:58 PM
> *To:* gem5 users mailing list <gem5-users@gem5.org>
> *Subject:* Re: [gem5-users] [EXT] Accessing logical (software) thread ID
> in gem5
>
>
>
> Thank you all for your help. I have been trying to to get what Paul
> suggested to work, however, I keep running into this problem:
>
>
>
> warn: Unable to find kernel symbol thread_info_task
> warn: Kernel not compiled with task_struct info; can't get currently
> executing task/process/thread name/ids!
>
>
>
> I am not sure what I need to modify in the kernel in order to get it to
> work. Any suggestions?
>
>
>
> On Fri, Jan 11, 2019 at 9:27 AM Paul Rosenfeld (prosenfeld) <
> prosenf...@micron.com> wrote:
>
> You could take the approach previously implemented by ARM, which is to add
> a few annotations to your kernel that allow you to find the task_info
> structures in kernel memory and then ask gem5 to hook the kernel process
> switch function. Each time the kernel context switches on a core, you get a
> callback into gem5 and you can look up the process info. It’s been a while
> since I’ve worked on this sort of thing but you might be able to look at
> this patch for some hints about where to look:
>
>
>
> https://gem5-review.googlesource.com/c/public/gem5/+/2640
>
>
>
>
>
> Cheeers,
>
> Paul
>
>
>
> *From:* gem5-users [mailto:gem5-users-boun...@gem5.org] *On Behalf Of *Shehab
> Elsayed
> *Sent:* Thursday, January 10, 2019 11:53 AM
> *To:* gem5-users@gem5.org
> *Subject:* [EXT] [gem5-users] Accessing logical (software) thread ID in
> gem5
>
>
>
> Hello All,
>
>
>
> 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.
>
>
>
> Best Regards,
>
> Shehab
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to