Steve,

>From the trace below, I get the impression that self fails because
the getinfo() call returns bogus information which says that no
counters are available.

Here is one thing you can try to verify this:
   edit self.c and comment out the detect_unavail_pmcs() function,
recompile and try again.


On Tue, Aug 19, 2008 at 1:50 AM,  <[EMAIL PROTECTED]> wrote:
> Stephane
>
>> Try making the syscall contiguous first. So adjust libpfm, no the kernel.
>> And yes, I was referring to the adjust_sys_base() function.
>>
>
> I rebuilt my kernel to use syscall numbers that start with 280 (so they
> will be contiguous) for perfmon and then rebooted.  I then rebuilt libpfm
> after changeing the value assigned to sys_base from 286 to 280 in the
> default case of the "adjust_sys_base()" function for the x86_64 arch.
>
> When I build libpfm, the code under "#ifdef PFMLIB_VERSION_22" is not
> getting compiled.  When I run the make the compiles look like this:
>
> gcc -O2 -g -Wall -Werror -I/opt/hpctk/downloads/libpfm/libpfm-3.5
> /lib/../include -D_REENTRANT -DCONFIG_PFMLIB_ARCH_X86_64 -I. -c
> pfmlib_os_linux.c
>
> When I run the tests now, I still get the invalid FD on the kernel call
> following the pfm_create_context because the FD allocated in the create
> call does not get returned to the caller.
>
> If I add "-DPFMLIB_VERSION_22" to the CFLAGS in config.mk then make libpfm,
> the FD allocated in the create call gets passed back to the caller and the
> next call gets a different error.  The ./self program with this combination
> gets this result:
>
> [jax] (hpctk) examples> ./self
> pfmlib_os_linux.c.214 (adjust_sys_base): Entered
> sycall base 280
> pfmlib_os_linux.c.128 (pfm_create_context): Entered
> pfmlib_os_linux.c.136 (pfm_create_context): VERSION_22 fd values r: 0
> ctx_fd 3
> pfmlib_core.c.368 (pfm_core_dispatch_counters): i=0 next_gen=0 last=1
> isset=1
> pfmlib_core.c.368 (pfm_core_dispatch_counters): i=0 next_gen=1 last=1
> isset=0
> pfmlib_core.c.375 (pfm_core_dispatch_counters): cannot assign generic
> counters
> cannot configure events: cannot assign events to counters
>
> Kernel messages for this run look like this (some debug messages have been
> added):
>
> perfmon: perfmon/perfmon_syscalls.c.365(sys_pfm_create_context): CPU6
> [6619]: Entered
> perfmon: perfmon/perfmon.c.1517(__pfm_create_context): CPU6 [6619]: Entered
> perfmon: perfmon/perfmon_pmu.c.395(pfm_pmu_conf_get): CPU6 [6619]: Entered
> perfmon: perfmon/perfmon_file.c.699(pfm_alloc_fd): CPU6 [6619]: Entered
> perfmon: perfmon/perfmon_file.c.717(pfm_alloc_fd): CPU6 [6619]: new inode
> ino=20117 @ffff810122ebe6c0
> perfmon: perfmon/perfmon_sets.c.490(pfm_find_set): CPU6 [6619]: looking for
> set=0
> perfmon: perfmon/perfmon_sets.c.559(pfm_find_set): CPU6 [6619]: set_id=0
> size=2584 view=ffff810116eae970 remap=0 mmap_offs=0
> perfmon: perfmon/perfmon_sets.c.468(pfm_init_evtset): CPU6 [6619]: set0
> pmc1=0x100000
> perfmon: perfmon/perfmon.c.1626(__pfm_create_context): CPU6 [6619]:
> ctx=ffff810117980000 flags=0x0 system=0 notify_block=0 no_msg=0 use_fmt=0
> remap=0 ctx_fd=3 mode=0
> perfmon: perfmon/perfmon.c.1639(__pfm_create_context): CPU6 [6619]: got to
> normal return
> perfmon: perfmon/perfmon_sets.c.926(sys_pfm_getinfo_evtsets): CPU6 [6619]:
> Entered
> perfmon: perfmon/perfmon_syscalls.c.127(pfm_check_task_state): CPU6 [6619]:
> state=1 [-1] task_state=-1 check_mask=0x0
> perfmon: perfmon/perfmon_sets.c.617(__pfm_getinfo_evtsets): CPU6 [6619]:
> set_id=0
> perfmon: perfmon/perfmon_sets.c.667(__pfm_getinfo_evtsets): CPU6 [6619]:
> set 0 flags=0x0 eff_usec=0 runs=0
> perfmon: perfmon/perfmon_file.c.509(__pfm_close): CPU6 [6619]: state=1
> perfmon: perfmon/perfmon.c.118(pfm_context_free): CPU6 [6619]: free ctx
> @ffff810117980000
>
>


> Results when I provide the PFMLIB_VERSION_22 conditional compile variable
> seem to be a little better.
> Is this the correct way to build ??
>
> Do you have any idea what I may have messed up or where to look for "cannot
> assign events to counters" problem ??
>
> Thanks
> Gary
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to