Thanks Thomas.

For energy/RAPL, I believe it’s true.
Assuming it is exposed. how does the monitoring thread/exposing func, read the 
foreign registers. These are not shared memory or shared cache-lines.

The only way I know is attaching to a process through ptrace.



> On Mar 10, 2023, at 7:53 PM, Tomas Kuchta <[email protected]> 
> wrote:
> 
> I'd imagine that it is all in plain text in /proc file system expised by
> the kernel.
> 
> - Tomas
> 
>> On Fri, Mar 10, 2023, 19:51 Khaled Mahmoud <[email protected]> wrote:
>> 
>> Hi,
>> 
>> I have been trying to find an answer to this question for a long time, but
>> I have not found a clear answer or reference.
>> 
>> *Context: *Linux perf tool, can read performance counters, either
>> system-wide or for specific threads/processes of interests. Performance
>> counters are stored in Model Specific Registers which are core registers.
>> 
>> *Question*: How are tools like perf able to read the performance counters
>> that reside in foreign registers in foreign cores ?
>> 
>> *My Understanding So Far*: Unless there is explicit support from CPU(s),
>> which there is nothing I am aware of, the only way to do this is through
>> Linux ptrace. You interrupt a process, inspect its values, and let go ?
>> 
>> I asked this question in the PAPI mailing list a while ago, but I did not
>> get the answer I am looking for. They advised me to ask in a Linux group.
>> 
>> Apologies if this is not the right group to ask the question
>> 
>> 
>> --
>> Regards,
>> Khaled Mahmoud
>> 

Reply via email to