OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 62363] New: I want profile httpd, but some function can not be analyzed by gprof


https://bz.apache.org/bugzilla/show_bug.cgi?id=62363

            Bug ID: 62363
           Summary: I want profile httpd, but some function can not be
                    analyzed by gprof
           Product: Apache httpd-2
           Version: 2.4.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: support
          Assignee: bugs@xxxxxxxxxxxxxxxx
          Reporter: hehaochen@xxxxxxxxxxx
  Target Milestone: ---

Created attachment 35922
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35922&action=edit
The gmon file generated by gprof after i run -k graceful and -k stop

I want to use gprof to profile httpd. But seems not all functions are profiled.

How I do:

1.I install the httpd-2.4.4 from source code with:

    CFLAGS+="-pg" ./configure --with-included-apr --with-mpm=prefork

2.After make & make install, I run httpd with

    ./bin/httpd -k start

and

    ./bin/httpd -k graceful

3.It successfully generate the gmon.out. Since this file is generate whenever
the process is terminated, so the code of doing shutting down should be
profiled. For example the function 'ap_mpm_pod_killpg' in /server/mpm-unix.c.(I
am very sure of it because when I add personal code in this function, it
executed successfully).

4.However, when I run

    gprof ./bin/httpd  gmon.out >report.txt

and open the 'report.txt'. The functions analyzed by gprof does **NOT** contain
'ap_mpm_pod_killpg'

5.The log is:

    [Wed May 09 10:10:57.326904 2018] [mpm_prefork:notice] [pid 32256] AH00163:
Apache/2.4.4 (Unix) configured -- resuming normal operations
    [Wed May 09 10:10:57.327019 2018] [core:notice] [pid 32256] AH00094:
Command line: './bin/httpd'
    [Wed May 09 10:11:07.784181 2018] [mpm_prefork:notice] [pid 32256] AH00171:
Graceful restart requested, doing restart
    _mcleanup: gmon.out: Permission denied
    _mcleanup: gmon.out: Permission denied
    _mcleanup: gmon.out: Permission denied
    _mcleanup: gmon.out: Permission denied
    _mcleanup: gmon.out: Permission denied
    AH00558: httpd: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1. Set the 'ServerName' directive globally to
suppress this message
    [Wed May 09 10:11:12.790487 2018] [mpm_prefork:notice] [pid 32256] AH00163:
Apache/2.4.4 (Unix) configured -- resuming normal operations

6. Did I made some mistake? Or it seems to related to permission issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx