pmcstat only reports kernel samples

Hi guys,

I have just run into an issue with pmcstat(8) on a FreeBSD 12.1 AMD box. Basically, all the samples that happen in our userland application are counted as dubious-frames. We can see the samples in the kernel, but not the samples from our application.

Here is what we are doing for instance:
Code:
pmcstat -S unhalted-core-cycles -O out.pmc /our_application
pmcstat -R out.c -z 32 -G out.stacks
And we can directly see the issue in the output:
Code:
CONVERSION STATISTICS:
  #exec/elf                                7
  #samples/total                           2321771
  #callchain/dubious-frames                930247
And if we run the application and run pmcstat in top mode (-T), we can see many unresolved samples that happen to be the samples from our application (they are growing quickly according to the load of the program).

We never saw that in our previous architectures.

Does anybody has a hint at what we could be looking?

Thanks
 
Elazar That's a good idea, thanks.

It seems that my issue could be related to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234325
* But it may not be entirely the same issue

I have started debugging the code and it seems that the PC reported by the PMC events are not found within the process maps. But I do not know what could cause the issue:
* Invalid PC from hwmc (unlikely)
* Invalid process maps
* Invalid debug symbol reading

I will continue to investigate and I will gladly take your ideas :)
 
Back
Top