On which processor is a thread running?

O

Object01

Is there a way to determine which processor a thread is or was running
on at a specific point in time? I want to examine patterns in how the
thread scheduler assigns waiting threads to processors.
 
W

Willy Denoyette [MVP]

Object01 said:
Is there a way to determine which processor a thread is or was running
on at a specific point in time? I want to examine patterns in how the
thread scheduler assigns waiting threads to processors.

You can't do this from user code, only low level CPU drivers can get at this info, provided
the CPU has the required event counter/triggers for that. So, depending on the CPU vendor,
you'll need a low level profiler, Intel has the "Intel VTuneT Performance Analyzers" for
it's recent processor line that can be used for that, AMD has something similar.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top