Quantcast
Channel: C#
Viewing all articles
Browse latest Browse all 1853

Attaching to a Process

$
0
0

Configure the Intel® VTune™ Amplifier analysis to collect performance data on a particular process using the Attach to Process target type.

VTune Amplifier enables you to focus your performance analysis on a specific process.

Note

  • Attaching to .NET processes is not supported for hardware event-based sampling analysis types.

  • VTune Amplifier provides limited support for profiling Windows* services. For details, see Profiling Windows Services article on the web.

To specify a process as the analysis target:

  1. Click the Project Properties button on the VTune Amplifier toolbar.

    The Project Properties dialog box opens with the Target tab enabled.

  2. Choose between local and remote data collection by configuring the Target system option.

    VTune Amplifier XE supports remote analysis on regular Linux systems. VTune Amplifier for Systems supports remote analysis on embedded Linux and Android* systems.

  3. From the Target type drop-down menu, select the Attach to Process target type.

    The Target tab is updated with the Attach to Process configuration pane.

  4. Specify the name and PID of a process that is currently running as an analysis target.

    For the remote data collection, VTune Amplifier provides an option to select the required process:

    1. Click the Browse button.

      The Select Process dialog box opens providing a list of processes currently running on your system.

    2. Select the process and click OK.

      VTune Amplifier automatically updated the Process name and PID fields with the data for the selected process.

  5. Configure the target properties, if required, and click OK to save your settings.
When you run an analysis, the VTune Amplifier attaches to the process and starts collecting data.

To detach from the process, click the button on the command toolbar. The process will keep running but the analysis will be stopped.

You can use the VTune Amplifier to profile the Windows kernel-mode process and analyze all privileged resource operations (for example, memory management, paging) it is responsible for or to explore your multithreaded kernel-mode drivers running in the context of this process. If you are a driver developer, this option can help you profile asynchronous driver threads and identify system resource utilization issues (for example, issues caused by frequent page allocations). To analyze the system process, run the VTune Amplifier with administrative privileges and configure the analysis target to attach to PID 4. In case of event-based call stack collection, call stacks will show kernel-mode functions only (because of the absence of the user-mode context).

Tip

To focus on analyzing particular processes, you may collect data on all processes (without selecting the Attach to Process target type) and then filter the collected results as follows:

  1. From the Grouping drop-down menu in the Bottom-up pane, select the grouping by Process, for example: Process/Function/Thread/Call Stack.

  2. In the grid, right-click the process you are interested in and select the Filter In by Selection option from the context menu.

    VTune Amplifier updates the grid to provide data for the selected process only.

  3. From the Grouping drop-down menu, select any other grouping level you need, for example: Function/Call Stack.

    VTune Amplifier groups the data for the selected process according to the granularity you specified.

Note

For driverless event-based sampling data collection, VTune Amplifier for Systems supports local and remote Launch Application, Attach to Process and Profile System target types. However, specifying a call stack collection and MRTE/JIT specific profiling is not supported. Support for these target types fully depends on the Linux Perf profiling credentials specified in the /proc/sys/kernel/perf_event_paranoid file and managed by the administrator of your system using root privileges. For more information see the perf_event related configuration files topic at http://man7.org/linux/man-pages/man2/perf_event_open.2.html. By default, only profiling of user processes at the both user and kernel spaces is permitted. Consequently, you need to have wider profiling privileges granted via the perf_event_paranoid file, to employ the Profile System target type.

Inglese

Viewing all articles
Browse latest Browse all 1853

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>