Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Apr 2015 03:00:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 198148] [hwpmc] pmcstat -G doesn't resolve symbols from userland processes
Message-ID:  <bug-198148-8-ePiudTOBQ2@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-198148-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-198148-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198148

--- Comment #5 from ganbold@gmail.com ---
It looks like when program isn't compiled with debug symbols pmcstat won't
resolve.

Please try following with nginx:

1. Before compiling and installing nginx from ports run make clean.
1. Then run make config to choose DEBUG option additionally.
2. Run make
3. Depending from shell do similar way:
   env DONTSTRIP=1 make install
   or:
   setenv DONTSTRIP 1 && make install

4. Restart nginx

Now start test with httperf to make load on nginx.

Then run for instance:

pmcstat -P INSTR_RETIRED_ANY -O /var/tmp/sample -t <nginx worker process pid>

After while stop it and run:

pmcstat -R /var/tmp/sample -G /var/tmp/sample.callgraph

to generate callgraph or:

pmcstat -R /var/tmp/sample -F /var/tmp/sample.calltree

if you want calltree.

I was successfully able to get callgraph and also calltree with resolved nginx
symbols.
...
01.04%  [350]      ngx_vslprintf @ /usr/local/sbin/nginx
 73.43%  [257]       ngx_sprintf
  48.25%  [124]        ngx_http_time
   100.0%  [124]         ngx_http_header_filter
    100.0%  [124]          ngx_http_chunked_header_filter
     100.0%  [124]           ngx_http_range_header_filter
      100.0%  [124]            ngx_http_gzip_header_filter
       100.0%  [124]             ngx_http_ssi_header_filter
        100.0%  [124]              ngx_http_charset_header_filter
         100.0%  [124]               ngx_http_userid_filter
          100.0%  [124]                ngx_http_headers_filter
           100.0%  [124]                 ngx_http_not_modified_header_filter
            100.0%  [124]                  ngx_http_send_header
             100.0%  [124]                   ngx_http_static_handler
              100.0%  [124]                    ngx_http_core_content_phase
               100.0%  [124]                     ngx_http_core_run_phases
  19.84%  [51]         ngx_http_header_filter
   100.0%  [51]          ngx_http_chunked_header_filter
    100.0%  [51]           ngx_http_range_header_filter
     100.0%  [51]            ngx_http_gzip_header_filter
      100.0%  [51]             ngx_http_ssi_header_filter
       100.0%  [51]              ngx_http_charset_header_filter
        100.0%  [51]               ngx_http_userid_filter
         100.0%  [51]                ngx_http_headers_filter
          100.0%  [51]                 ngx_http_not_modified_header_filter
           100.0%  [51]                  ngx_http_send_header
            100.0%  [51]                   ngx_http_static_handler
             100.0%  [51]                    ngx_http_core_content_phase
              100.0%  [51]                     ngx_http_core_run_phases
               100.0%  [51]                      ngx_http_handler
  17.12%  [44]         ngx_http_set_etag
   100.0%  [44]          ngx_http_static_handler
    100.0%  [44]           ngx_http_core_content_phase
     100.0%  [44]            ngx_http_core_run_phases
      100.0%  [44]             ngx_http_handler
       100.0%  [44]              ngx_http_internal_redirect
        100.0%  [44]               ngx_http_index_handler
         100.0%  [44]                ngx_http_core_content_phase
          100.0%  [44]                 ngx_http_core_run_phases
           100.0%  [44]                  ngx_http_handler
            100.0%  [44]                   ngx_http_process_request
             100.0%  [44]                    ngx_http_process_request_headers
              100.0%  [44]                     ngx_http_process_request_line
...

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-198148-8-ePiudTOBQ2>