Hi ! I am trying to use perfmon on Itanium 2 server (HP's testdrive td178 machine ). I have a multi-threaded program but each thread can be pinned to a different CPU (total 16 cores here). Each thread is going to monitor its own overflow (i.e. receive its own overflow notification). For configuring this, do i need to set PFM_FL_SYSTEM_WIDE while creating PFM_CONTEXT ?
Currently, I am not setting this flag. I get multiple contexts fd's - each per thread, for each fd i use fcntl with F_SETOWN to give the creator thread the ownership of that fd. Then i make each fd's asynchronous (using fcntl with O_ASYNC) and use Linux's sideaffect mechanism of F_SETSIG to get individual signals to each thread (i.e. for a file descriptor fd(x) created by thread(x), thread(x) receives the SIGIO signal signalling the overflow). However, I observe that when running with 4 threads on 4 cores , one thread hardly receives overflow notifications. Similarly, running with higher number of threads(eg 16), only a few threads get overflow notifications and the others get very little. What could be wrong here ? Is there anything i need to do to program perfmon ? Thanks in Advance ! Regards, Vivek PS : This mechanism used to work well when I was running with LinuxThreads (1 thread = 1 pid model). I then always used getpid() instead of gettid(). My current system however doesn't support LD_ASSUME_KERNEL environment variable. So, I have to run it with NPTL threads now. I have pfmon version 3.2 and i am using libpfm-3.1. kernel is 2.6.18 _______________________________________________ perfmon mailing list [email protected] http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/
