[parsec-users] multithread vs single thread

Jim Dempsey jim at quickthreadprogramming.com
Tue Apr 19 10:29:17 EDT 2011

Perhaps the 7.5B cycles includes the cycles outside the ROI (region of

Try using RDTSC to be called from each thread to read the simulated clock
counter. Place this at the start and end of the do work function that all
threads pass through. Each thread can compute there own number of clock
ticks, then issue an interlocked add to produce a summation. This will give
you the simulated clock ticks but not the instruction counts. If you want
the instruction counts, then you will have to use the performance counters
via RDPMC (you will have to do some googling to find an example).

SIMICS may have C function call that you can insert into your code that
controls collection of counter data. If it does, then this may be the way
for you to go.

Jim Dempsey

-----Original Message-----
From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Mahmood
Sent: Tuesday, April 19, 2011 12:49 AM
Subject: [parsec-users] multithread vs single thread

When I run blackscholes with one thread the total cycles reported by simics
are about 7.5B cycles. However when I run it with 4 threads, each core runs
for 850M cycles (totally 3.3B cycles). Is that normal? Does this
multithreading represents parallel execution?


// Naderan *Mahmood;

parsec-users mailing list
parsec-users at lists.cs.princeton.edu

More information about the parsec-users mailing list