11
Slide 1 of 11 Code Optimization and Performance Tuning Using Intel VTune In this session, you will learn to: Identify system-level performance issues by using counter monitor Objectives

06 intel v_tune_session_08

Embed Size (px)

Citation preview

Page 1: 06 intel v_tune_session_08

Slide 1 of 11

Code Optimization and Performance Tuning Using Intel VTune

In this session, you will learn to:Identify system-level performance issues by using counter monitor

Objectives

Page 2: 06 intel v_tune_session_08

Slide 2 of 11

Code Optimization and Performance Tuning Using Intel VTune

Problem Statement:John has developed a code in Java, which involves the use of two-dimensional matrices. However, on execution, the application performs very slowly. Therefore, John decides to view the functional flow of the application and find the details of the functions that have large self time. Therefore, John decides to analyze the performance of the application using call graph of VTune Performance Analyzer. Help John accomplish his task.

Activity: Using Call Graph – 2

Page 3: 06 intel v_tune_session_08

Slide 3 of 11

Code Optimization and Performance Tuning Using Intel VTune

SolutionTo analyze the performance of the application using call graph, you need to perform the following tasks:

1. Configure call graphs using the Call Graph Configuration wizard.2. Analyze the functional flow of the application.3. Analyze the time taken by each function to execute.

Activity: Using Call Graph – 2 (Contd.)

Page 4: 06 intel v_tune_session_08

Slide 4 of 11

Code Optimization and Performance Tuning Using Intel VTuneUsing Counter Monitor

Counter monitor:Enables you to identify system-level issues in an application.Monitors and graphically displays performance counter data.Helps you understand the cause-and-effect relationship between an application and the system on which the application is running.

Page 5: 06 intel v_tune_session_08

Slide 5 of 11

Code Optimization and Performance Tuning Using Intel VTune

Problem Statement:Jim has developed a code to generate a list of random numbers. Once the numbers are generated, the user can also implement a delete operation on the list. However, on executing the application, he finds that the application is performing slowly. Jim has analyzed the performance of the application using sampling and call graph data collector of VTune Performance Analyzer. Now Jim decides to use counter monitor of VTune Performance Analyzer to analyze the cause-and-effect relationship between an application and the system on which the application is running. Therefore, Jim decides to analyze the performance of the application using the counter monitor feature of VTune Performance Analyzer. Help Jim to analyze the performance of the application using VTune Performance Analyzer?

Activity: Collecting Performance Counter Data – 1

Page 6: 06 intel v_tune_session_08

Slide 6 of 11

Code Optimization and Performance Tuning Using Intel VTune

SolutionTo analyze the performance of the application using counter monitor, you need to perform the following tasks:

1. Configure counter monitor using the Counter Monitor Configuration wizard.

2. Analyze the results of counter monitor.

Activity: Collecting Performance Counter Data – 1 (Contd.)

Page 7: 06 intel v_tune_session_08

Slide 7 of 11

Code Optimization and Performance Tuning Using Intel VTune

SolutionAfter collecting data, VTune Performance Analyzer displays the collected counter data in the following three views:

Runtime Data View: Displays the chart of the performance counters selected at run time as the activity progresses and counter data is collected.Logged Data View: Displays the performance counter data selected for logging in the Logged Data view, after the activity ends.Summary Data View: Displays a statistical view of the counter data.

Activity: Collecting Performance Counter Data – 1 (Contd.)

Page 8: 06 intel v_tune_session_08

Slide 8 of 11

Code Optimization and Performance Tuning Using Intel VTune

Problem Statement:Jim has developed an application in Java that involves the use of arrays. He decides to analyze the performance of his application using the counter monitor feature of VTune. He wants to view the processor utilization and the amount of context switching involved in his application. After analyzing the performance of his application, he wishes to optimize his application accordingly. Help Jim to analyze the performance of his application.

Activity: Collecting Performance Counter Data – 2

Page 9: 06 intel v_tune_session_08

Slide 9 of 11

Code Optimization and Performance Tuning Using Intel VTune

SolutionTo analyze the performance of the application using counter monitor, Jim needs to perform the following tasks:

1. Configure counter monitor.2. Analyze the results of counter monitor.

Activity: Collecting Performance Counter Data – 2 (Contd.)

Page 10: 06 intel v_tune_session_08

Slide 10 of 11

Code Optimization and Performance Tuning Using Intel VTune

SolutionYou cannot directly configure counter monitor wizard for java application.To collect counter monitor data for java application, you can first create an activity using the sampling wizard and then modify the activity by adding counter monitor from the available data collectors list.

Activity: Collecting Performance Counter Data – 2 (Contd.)

Page 11: 06 intel v_tune_session_08

Slide 11 of 11

Code Optimization and Performance Tuning Using Intel VTune

In this session, you learnt that:The counter monitor collector monitors and graphically displays performance counter data.The performance counter is a feature that measures and gathers the performance-related data that represents the state of a system.

Summary