From: Rui L. <ru...@nc...> - 2011-10-19 14:12:28
|
Forwarding to the perfsuite-users mailing list, as these questions or requests might be common... -------- Original Message -------- Subject: Re: Comment for PerfSuite feature request Date: Tue, 18 Oct 2011 15:23:41 -0700 From: Pavlush Margarian <pa...@gm...> To: Rui Liu CC: Rick Kufrin Dear Rui, Thanks a lot for quick reply! For Item #1: It's now clear for me that currently there is no way to control use of this signal. We use PAPI 4 with perfctr, so SIGPROF signal is used, we can't use this signal elsewhere in our application. For item #2: We use native binary executable, I already tried to run and profile multiple times. It's not so accurate as environment is different run to runs, also, run can last more that 24 hours, so run-time is serious constraint for this workaround. We can talk about this later. Probably we can help you to implement this feature if it's possible. Please let me know if there is such option. ... Thanks, Pavlush. On Tue, Oct 18, 2011 at 2:22 PM, Rui Liu wrote: Dear Pavlush, Thanks a lot for the prompt clarification! For item #1, "Allow a user to specify a signal to use when profiling", unfortunately this is not possible. (1) When the 3 itimer types: ITIMER_PROF, ITIMER_REAL and ITIMER_VIRTUAL, are used to profile, it is mandated by the Linux system calls that signals of the types SIGPROF, SIGALRM and SIGVTALRM be generated, respectively. Please see setitimer man page for more details. (2) When a PAPI event is used to profile, then PAPI's overflow mechanism is used. Browsing through PAPI's source code and testing confirmed that the signal types PAPI used (in recent 4.0.0+ versions) are: Substrate The signal type used -------------------------------------------- perf_events SIGRTMIN+2 (found to be 36) perfmon same as above perfctr SIGPROF (27) Since in this case PerfSuite uses PAPI to profile and to my knowledge, currently there exists no such PAPI option that can be set through PAPI_set_opt(), it seems impossible to change the signal type being used. Hopefully with the above info in mind, there is a possible workaround in your situation. For item #2, "Allow a user to profile using multiple events", yes this is a limitation known to us for native binary executables. (1) For Java applications, the PerfSuite 1.1.0 version released today contained a JVMTI-based agent named "psjprof", which can profile using multiple PAPI events simultaneously. (2) For a native binary executable, we might consider supporting it in the future, but currently there is no fixed plan. A possible workaround might be run and profile the program multiple times, each time using a different event. ... Thanks, Rui On 10/18/2011 12:39 PM, Pavlush Margarian wrote: > Dear Rui, > > Thank you for reply. I looked your comment on the source forge web site. > Let me clarify my question: in Profiling Mode, when you profile some particular event, is there any way to specify signal, which I want to use for interrupts? > As far as I understand PerfSuite (PAPI) generates an interrupt, when number of events, for particular function, reaches specified "threshold" value (in config .xml). > In profiling mode source of signal it's not an interval timer. Could you please confirm If I understand behavior correctly. > > For example, I have xml config file, which I use to profile L2 cache misses, looks like PerfSuite uses SIGPROF signal in this case. Is there a way to specify some other signal instead? > Here is my xml file how should I specify signal here? > > <?xml version="1.0" encoding="UTF-8" ?> > <ps_hwpc_profile class="PAPI"> > <!-- ========================================================== > This is a configuration file that can be used to ask for > profiling, based on total level 2 cache misses with a > period of 100,000. > > $Id: papi_profile_l2tcm.xml,v 1.1 2004/01/12 02:15:44 rkufrin Exp $ > ========================================================== --> > <ps_hwpc_event type="preset" name="PAPI_L2_TCM" threshold="100000"/> > </ps_hwpc_profile> > > Also, one more feature that is very important for me. > Looks like PerfSuite doesn't support multiple events simultaneously in Profiling Mode. Do you have any plans to add this feature? > > > Regards, > Pavlush. > > On Tue, Oct 18, 2011 at 8:26 AM, Rui Liu <rli...@us...> wrote: > > Dear Pavlush, > > I added a comment for your June 30 feature request for the > PerfSuite project on the source forge web site. > > Thanks, > Rui |