[Bug 198148] [hwpmc] pmcstat -G doesn't resolve symbols from userland processes

hiren panchasara hiren at strugglingcoder.info
Thu Mar 5 05:48:22 UTC 2015


On 03/02/15 at 01:47P, bugzilla-noreply at freebsd.org wrote:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198148
> 
>             Bug ID: 198148
>            Summary: [hwpmc] pmcstat -G doesn't resolve symbols from
>                     userland processes
>            Product: Base System
>            Version: 11.0-CURRENT
>           Hardware: Any
>                 OS: Any
>             Status: New
>           Severity: Affects Only Me
>           Priority: ---
>          Component: kern
>           Assignee: freebsd-bugs at FreeBSD.org
>           Reporter: adrian at freebsd.org
> 
> pmcstat -G doesn't seem to resolve symbols from userland processes correctly or
> reliably. In almost every instance, running pmcstat -G on a log file just
> plainly doesn't resolve anything that isn't a kernel symbol.
> 
> To reproduce:
> 
> * run some very CPU busy process with lots of threads and syscalls;
> * run pmcstat -O to record events to a logfile;
> * when you're done, try using pmcstat -R <file> -G to spit out the callgraph to
> stdout.
> 
> Even if all of the events are process-spec, I see /just/ kernel events.
> 
> This happens on both -HEAD and -10.

On -HEAD (r278050M), I do see non-kernel events. 
# pmcstat -S instructions -O /var/tmp/sample
# pmcstat -R /var/tmp/sample -G /var/tmp/sample.callgraph

In sample.callgraph, I see things like
 00.24%  [1]         sqlite3_column_bytes @ /usr/local/lib/libsqlite3.so.0.8.6
  100.0%  [1]          0xdb799d @ /usr/local/lib/firefox/libxul.so
 00.24%  [1]         unixShmLock @ /usr/local/lib/libsqlite3.so.0.8.6
  100.0%  [1]          walTryBeginRead
   100.0%  [1]           sqlite3PagerSharedLock
    100.0%  [1]            sqlite3BtreeBeginTrans
     100.0%  [1]             sqlite3VdbeExec
      100.0%  [1]              sqlite3_step
       100.0%  [1]               0xdb06b1 @ /usr/local/lib/firefox/libxul.so
 00.24%  [1]         copy_boxes @ /usr/local/lib/libcairo.so.2.11200.18
  100.0%  [1]          clip_and_composite_boxes
   100.0%  [1]           _cairo_traps_compositor_paint
    100.0%  [1]            _cairo_compositor_paint
     100.0%  [1]             _cairo_surface_paint
      100.0%  [1]              _cairo_gstate_paint
       100.0%  [1]               _cairo_default_context_paint_with_alpha
        100.0%  [1]                cairo_paint_with_alpha
         100.0%  [1]                 0xf540c6 @ /usr/local/lib/firefox/libxul.so

Am I understanding this correctly?

cheers,
Hiren
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20150304/a7976668/attachment.sig>


More information about the freebsd-bugs mailing list