> How can pfm_create_context (the syscall) return 0 if you are telling
> me stdin is still open? I think you need to start from that. It should
> not return 0 in that case. Maybe there is a problem with the return
> of the syscall on mips, or more likely there is a mismatch between
> the syscall number for pfm_create_context and the kernel, i.e., you
> are calling a different syscall.


What happens is pfm_create_context() is called before 
pfm_init_version_sysfs() is called.

Because of this, the perfmon library values are major 0 minor 0.

So this first time pfm_create_context() is called, the perfmon 2.2 
compatability routines are called, so even though the syscall properly 
returns fd 3, the compat libs convert this to a zero.

This causes the failure I see.

The pfm_create_context() having the problem is being called from
   main/pfmon_initialize/pfmon_arch_initialize/pfmon_detect_unavail_regs/
pfmon_get_unavail_regs

   I guess we need to make sure a call to pfm_init_version_sysfs() happens 
before this.

Vince

------------------------------------------------------------------------------
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to