{
    "content": [
        {
            "type": "text",
            "text": "# gp-collect-app (man)\n\n## NAME\n\ngp-collect-app - Collect performance data for the target application\n\n## SYNOPSIS\n\ngprofng collect app [option(s)] target [target-option(s)]\n\n## DESCRIPTION\n\nCollect performance data on the target program.  In addition to Program Counter (PC)\nsampling, hardware event counters and various tracing options are supported.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (20 subsections)\n- **NOTES**\n- **SEE ALSO**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "gp-collect-app",
        "section": "",
        "mode": "man",
        "summary": "gp-collect-app - Collect performance data for the target application",
        "synopsis": "gprofng collect app [option(s)] target [target-option(s)]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print the version number and exit."
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Print usage information and exit."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "By default, verbose mode is disabled. This option enables it."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "Disable (off) or enable (on) clock profiling using a default sampling granularity, or enable clock profiling implicitly by setting the sampling granularity (lo[w], hi[gh], or a specific value in ms). By default, clock profiling is enabled (-p on)."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "Enable hardware event counter profiling and select one or more counter(s). To see the supported counters on this system, use the -h option without other arguments."
            },
            {
                "flag": "-o",
                "long": null,
                "arg": null,
                "description": "Specify the name for the experiment directory. The name has to end with .er and may contain an absolute path (e.g. /tmp/experiment.er). An existing experiment with the same name will not be overwritten."
            },
            {
                "flag": "-O",
                "long": null,
                "arg": null,
                "description": "This is the same as the -o option, but unlike this option, silently overwrites an existing experiment directory with the same name."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "Add up to 10 comment strings to the experiment. These comments appear in the notes section of the header and can be retrieved with the gprofng display text command using the -header option."
            },
            {
                "flag": "-j",
                "long": null,
                "arg": null,
                "description": "Controls Java profiling when the target is a JVM machine. The allowed values for this option are: on Record profiling data for the JVM machine, and recognize methods compiled by the Java HotSpot virtual machine. Also record Java call stacks. off Do not record Java profiling data. Profiling data for native call stacks is still recorded. <path> Records profiling data for the JVM, and use the JVM as installed in <path>. The default is -j on."
            },
            {
                "flag": "-J",
                "long": null,
                "arg": null,
                "description": "Specifies one or more additional options to be passed to the JVM used. The jvm-option(s) list must be enclosed in quotation marks if it contains more than one option. The items in the list need to be separated by spaces or tabs. Each item is passed as a separate option to the JVM. Note that this option implies -j on."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "Collects data for the specified duration. The duration can be a single number, optionally followed by either m to specify minutes, or s to specify seconds, which is the default. The duration can also consists of two numbers separated by a minus (-) sign. If a single number is given, data is collected from the start of the run until the given time. If two numbers are given, data is collected from the first time to the second. In case the second time is zero, data is collected until the end of the run. If two non-zero numbers are given, the first must be less than the second."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": "not executed and no performance data is collected."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": "Control whether descendant processes should have their data recorded. To disable/enable this feature, use off/on. Use =regex to record data on those processes whose executable name matches the regular expression. Only the basename of the executable is used, not the full path. If spaces or characters interpreted by the shell are used, enclose the regex in single quotes. The default is -F on."
            },
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "Specify archiving of binaries and other files. In addition to disable this feature (off), or enable archiving off all loadobjects and sources (on), the other options support a more refined selection. All of these options enable archiving, but the keyword controls what exactly is selected: all load objects (ldobjects), all source files (src), the loadobjects asscoiated with a program counter (usedldobjects), or the source files associated with a program counter (usedsrc). The default is -a ldobjects."
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": "Disable (off), or enable (on) periodic sampling of process-wide resource utilization. By default, sampling occurs every second. Use the <seconds> option to change this. The default is -S on."
            },
            {
                "flag": "-y",
                "long": null,
                "arg": null,
                "description": "Controls recording of data with the signal named <signal>, referred to as the pause- resume signal. Whenever the given signal is delivered to the process, switch between paused (no data is recorded) and resumed (data is recorded) states. By default, data collection begins in the paused state. If the optional r is given, data collection begins in the resumed state and data collection begins immediately. SIGUSR1 or SIGUSR2 are recommended for this use, but any signal that is not used by the target can be used."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "Specify a signal that will trigger a sample of process-wide resource utilization. When the named <signal> is delivered to the process, a sample is recorded. The signal can be specified using the full name, without the initial letters \"SIG\", or the signal number. Note that the kill command can be used to deliver a signal. If both the -l and -y options are used, the signal must be different."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "Enable synchronization wait tracing, where <option> is used to define the specifics of the tracing (on, off, <threshold>, or all). The API is selected through the setting for <API>: n selects native/Pthreads, j selects Java, and nj selects both. The default is -s off."
            },
            {
                "flag": "-H",
                "long": null,
                "arg": null,
                "description": "Disable (off), or enable (on) heap tracing. The default is -H off."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "Disable (off), or enable (on) I/O tracing. The default is -i off."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "gprofng",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gprofng/1/json"
            },
            {
                "name": "gp-archive",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gp-archive/1/json"
            },
            {
                "name": "gp-display-gui",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gp-display-gui/1/json"
            },
            {
                "name": "gp-display-html",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gp-display-html/1/json"
            },
            {
                "name": "gp-display-src",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gp-display-src/1/json"
            },
            {
                "name": "gp-display-text",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/gp-display-text/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "-v, --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-p {off | on | lo[w] | hi[gh] | _",
                        "lines": 4,
                        "flag": "-p"
                    },
                    {
                        "name": "-h _",
                        "lines": 3,
                        "flag": "-h"
                    },
                    {
                        "name": "-o _",
                        "lines": 4,
                        "flag": "-o"
                    },
                    {
                        "name": "-O _",
                        "lines": 3,
                        "flag": "-O"
                    },
                    {
                        "name": "-C _",
                        "lines": 4,
                        "flag": "-C"
                    },
                    {
                        "name": "-j {on | off | _",
                        "lines": 14,
                        "flag": "-j"
                    },
                    {
                        "name": "-J _",
                        "lines": 5,
                        "flag": "-J"
                    },
                    {
                        "name": "-t _",
                        "lines": 10,
                        "flag": "-t"
                    },
                    {
                        "name": "-n",
                        "lines": 2,
                        "flag": "-n"
                    },
                    {
                        "name": "-F {off|on|=_",
                        "lines": 6,
                        "flag": "-F"
                    },
                    {
                        "name": "-a {off|on|ldobjects|src|usedldobjects|usedsrc}",
                        "lines": 9,
                        "flag": "-a"
                    },
                    {
                        "name": "-S {off|on|_",
                        "lines": 4,
                        "flag": "-S"
                    },
                    {
                        "name": "-y _",
                        "lines": 10,
                        "flag": "-y"
                    },
                    {
                        "name": "-l _",
                        "lines": 8,
                        "flag": "-l"
                    },
                    {
                        "name": "-s _",
                        "lines": 5,
                        "flag": "-s"
                    },
                    {
                        "name": "-H {off|on}",
                        "lines": 2,
                        "flag": "-H"
                    },
                    {
                        "name": "-i {off|on}",
                        "lines": 2,
                        "flag": "-i"
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 9,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "gp-collect-app - Collect performance data for the target application\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "gprofng collect app [option(s)] target [target-option(s)]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Collect performance data on the target program.  In addition to Program Counter (PC)\nsampling, hardware event counters and various tracing options are supported.\n\nFor example, this command collects performance data for an executable called a.out and stores\nthe data collected in an experiment directory with the name example.er.\n\n$ gprofng collect app -o example.er ./a.out\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--version",
                        "content": "Print the version number and exit.\n",
                        "long": "--version"
                    },
                    {
                        "name": "--help",
                        "content": "Print usage information and exit.\n",
                        "long": "--help"
                    },
                    {
                        "name": "-v, --verbose",
                        "content": "By default, verbose mode is disabled.  This option enables it.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-p {off | on | lo[w] | hi[gh] | _",
                        "content": "Disable  (off)  or  enable  (on) clock profiling using a default sampling granularity, or\nenable clock profiling implicitly by setting the sampling granularity (lo[w], hi[gh],  or\na specific value in ms).  By default, clock profiling is enabled (-p on).\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-h _",
                        "content": "Enable  hardware  event  counter profiling and select one or more counter(s).  To see the\nsupported counters on this system, use the -h option without other arguments.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-o _",
                        "content": "Specify the name for the experiment directory.  The name has to  end  with  .er  and  may\ncontain an absolute path (e.g. /tmp/experiment.er).  An existing experiment with the same\nname will not be overwritten.\n",
                        "flag": "-o"
                    },
                    {
                        "name": "-O _",
                        "content": "This  is  the  same  as  the  -o  option,  but unlike this option, silently overwrites an\nexisting experiment directory with the same name.\n",
                        "flag": "-O"
                    },
                    {
                        "name": "-C _",
                        "content": "Add up to 10 comment strings to the experiment.   These  comments  appear  in  the  notes\nsection  of  the  header and can be retrieved with the gprofng display text command using\nthe -header option.\n",
                        "flag": "-C"
                    },
                    {
                        "name": "-j {on | off | _",
                        "content": "Controls Java profiling when the target is a JVM machine.  The allowed  values  for  this\noption are:\n\non  Record profiling data for the JVM machine, and recognize methods compiled by the Java\nHotSpot virtual machine.  Also record Java call stacks.\n\noff Do  not  record  Java profiling data.  Profiling data for native call stacks is still\nrecorded.\n\n<path>\nRecords profiling data for the JVM, and use the JVM as installed in <path>.\n\nThe default is -j on.\n",
                        "flag": "-j"
                    },
                    {
                        "name": "-J _",
                        "content": "Specifies one or more additional options to be passed to the JVM used.  The jvm-option(s)\nlist must be enclosed in quotation marks if it contains more than one option.  The  items\nin  the  list  need to be separated by spaces or tabs.  Each item is passed as a separate\noption to the JVM.  Note that this option implies -j on.\n",
                        "flag": "-J"
                    },
                    {
                        "name": "-t _",
                        "content": "Collects data for  the  specified  duration.   The  duration  can  be  a  single  number,\noptionally followed by either m to specify minutes, or s to specify seconds, which is the\ndefault.\n\nThe duration can also consists of two numbers separated by a minus (-) sign.  If a single\nnumber  is  given,  data is collected from the start of the run until the given time.  If\ntwo numbers are given, data is collected from the first time to the second.  In case  the\nsecond time is zero, data is collected until the end of the run.  If two non-zero numbers\nare given, the first must be less than the second.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-n",
                        "content": "not executed and no performance data is collected.\n",
                        "flag": "-n"
                    },
                    {
                        "name": "-F {off|on|=_",
                        "content": "Control whether descendant processes should have their data recorded.  To  disable/enable\nthis  feature, use off/on.  Use =regex to record data on those processes whose executable\nname matches the regular expression.  Only the basename of the executable  is  used,  not\nthe  full  path.   If spaces or characters interpreted by the shell are used, enclose the\nregex in single quotes.  The default is -F on.\n",
                        "flag": "-F"
                    },
                    {
                        "name": "-a {off|on|ldobjects|src|usedldobjects|usedsrc}",
                        "content": "Specify archiving of binaries and other files.   In  addition  to  disable  this  feature\n(off),  or  enable  archiving  off  all  loadobjects  and sources (on), the other options\nsupport a more refined selection.\n\nAll of these options enable archiving, but the keyword controls what exactly is selected:\nall load objects (ldobjects), all source files (src), the loadobjects asscoiated  with  a\nprogram  counter  (usedldobjects),  or the source files associated with a program counter\n(usedsrc).  The default is -a ldobjects.\n",
                        "flag": "-a"
                    },
                    {
                        "name": "-S {off|on|_",
                        "content": "Disable (off), or enable (on) periodic sampling of process-wide resource utilization.  By\ndefault, sampling occurs every second.  Use the <seconds> option  to  change  this.   The\ndefault is -S on.\n",
                        "flag": "-S"
                    },
                    {
                        "name": "-y _",
                        "content": "Controls  recording  of  data  with  the signal named <signal>, referred to as the pause-\nresume signal.  Whenever the given signal is delivered to  the  process,  switch  between\npaused (no data is recorded) and resumed (data is recorded) states.\n\nBy default, data collection begins in the paused state.  If the optional r is given, data\ncollection begins in the resumed state and data collection begins immediately.\n\nSIGUSR1  or  SIGUSR2 are recommended for this use, but any signal that is not used by the\ntarget can be used.\n",
                        "flag": "-y"
                    },
                    {
                        "name": "-l _",
                        "content": "Specify a signal that will trigger a sample of process-wide resource  utilization.   When\nthe named <signal> is delivered to the process, a sample is recorded.\n\nThe  signal  can  be specified using the full name, without the initial letters \"SIG\", or\nthe signal number.  Note that the kill command can be used to deliver a signal.\n\nIf both the -l and -y options are used, the signal must be different.\n",
                        "flag": "-l"
                    },
                    {
                        "name": "-s _",
                        "content": "Enable synchronization wait tracing, where <option> is used to define  the  specifics  of\nthe  tracing (on, off, <threshold>, or all).  The API is selected through the setting for\n<API>: n selects native/Pthreads, j selects Java, and nj selects both.  The default is -s\noff.\n",
                        "flag": "-s"
                    },
                    {
                        "name": "-H {off|on}",
                        "content": "Disable (off), or enable (on) heap tracing.  The default is -H off.\n",
                        "flag": "-H"
                    },
                    {
                        "name": "-i {off|on}",
                        "content": "Disable (off), or enable (on) I/O tracing.  The default is -i off.\n",
                        "flag": "-i"
                    }
                ]
            },
            "NOTES": {
                "content": "Any executable in the ELF (Executable and Linkable Format) object  format  can  be  used  for\nprofiling with gprofng.  If debug information is available, gprofng can provide more details,\nbut this is not a requirement.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "gprofng(1),    gp-archive(1),   gp-display-gui(1),   gp-display-html(1),   gp-display-src(1),\ngp-display-text(1)\n\nThe user guide for gprofng is maintained as a  Texinfo  manual.   If  the  info  and  gprofng\nprograms  are  correctly  installed,  the  command  info  gprofng  should give access to this\ndocument.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2022-2024 Free Software Foundation, Inc.\n\nPermission is granted to copy, distribute and/or modify this document under the terms of  the\nGNU  Free  Documentation  License,  Version  1.3  or  any later version published by the Free\nSoftware Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-\nCover Texts.  A  copy  of  the  license  is  included  in  the  section  entitled  \"GNU  Free\nDocumentation License\".\n\nbinutils-2.42                                2026-02-09                          GP-COLLECT-APP.1(1)",
                "subsections": []
            }
        }
    }
}