Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1093 Discussions

Getting -mix output from more than thread 0

twilkens
Beginner
282 Views
Hi,
I find that the -mix output of SDE is very useful. Unfortuntately it only outputs by default for thread 0. Is there a way i can get it to output for more than 1 thread? I've tried:

sde -mix -p -mt -- "exe"

but it doesn't output stats for all threads. I also tried to specify the number of threads via "-mt 4" but that is not the correct usage. In the -phelp it states by default it is 1, how do I change that?

Additionally, if you're executable is a shell script.. and you have multiple jobs sent serially in that shell script, those jobs are launched as new processes. Will SDE in -mix output catch the instruction/loop stats for the spawned processes if you are successful in speciftying mutliple thread support in -mix output?

Thanks for any help..

Tim
0 Kudos
2 Replies
MarkC_Intel
Moderator
282 Views
Quoting - twilkens
I find that the -mix output of SDE is very useful. Unfortuntately it only outputs by default for thread 0. Is there a way i can get it to output for more than 1 thread? I've tried:

...

Additionally, if you're executable is a shell script.. and you have multiple jobs sent serially in that shell script, those jobs are launched as new processes. Will SDE in -mix output catch the instruction/loop stats for the spawned processes if you are successful in speciftying mutliple thread support in -mix output?


For your first question: mix will grab all threads by default. No other options required. Not sure why you are not seeing multiple threads in the output. It emits one summary per thread and then totals them up at the bottom of the output file. Search for "TID " followed by a number. (Just curious, what operating system are you using?)

For the 2nd question: by default mix is for one process (and all its threads). The default output file is mix.out so if you have a shell script invoking other executables, they'll all be writing mix.out and that is not what anyone wants. You could modify your script to invoke "sde -omix FN --" before each command that is executed changing FN for each command, but that can be cumbersome. The easier way is to use "sde -mix -i -- scriptname" . The '-i' tells mix to tack the PID on to the mix.out file name. You don't really know which process is which, but you get separate files.

About the options: "sde -help" gives the short help for the sde driver program. "sde -phelp" gives pin help -- and that is almost never needed. "sde -thelp" gives help for the emulator pin tool by default. "sde -mix -thelp" gives the mix (emulator-enabled) pin tool help msg. The next version of SDE cleans up the tool knobs help message a little bit.

Let me know if this helps or not...

Regards,
Mark
0 Kudos
twilkens
Beginner
282 Views

For your first question: mix will grab all threads by default. No other options required. Not sure why you are not seeing multiple threads in the output. It emits one summary per thread and then totals them up at the bottom of the output file. Search for "TID " followed by a number. (Just curious, what operating system are you using?)

For the 2nd question: by default mix is for one process (and all its threads). The default output file is mix.out so if you have a shell script invoking other executables, they'll all be writing mix.out and that is not what anyone wants. You could modify your script to invoke "sde -omix FN --" before each command that is executed changing FN for each command, but that can be cumbersome. The easier way is to use "sde -mix -i -- scriptname" . The '-i' tells mix to tack the PID on to the mix.out file name. You don't really know which process is which, but you get separate files.

About the options: "sde -help" gives the short help for the sde driver program. "sde -phelp" gives pin help -- and that is almost never needed. "sde -thelp" gives help for the emulator pin tool by default. "sde -mix -thelp" gives the mix (emulator-enabled) pin tool help msg. The next version of SDE cleans up the tool knobs help message a little bit.

Let me know if this helps or not...

Regards,
Mark

Mark,
I'm using it on OpenSUSE 11.0 at the moment. I was running a home built DGEMM and noted the mix outputs weren't tracked to threads other than 0. I hacked that.. but likely now I might have been able to get that working. I'll look into that again.

So.. mix.out is by per process. No way to sum all the process results? That's a bit unfortunate.. this is a great tool.. and apps like SPEC06 do tons of processes to get 1 spec benchmark run. GCC in SPEC06 int for example runs gcc 9x for 1 result. Would be nice to get all the stats put together. Otherwise you have 9 different mix outputs.

Don't misunderstand me.. I love the tool.. very useful. I just ran into this issue today.. and wanted to see how I could work around it. Doesn't appear there is a work around other than collating all the stats myself in a script.

Thanks for your prompt reply Mark.. and have a great day..

Tim
0 Kudos
Reply