- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm a beginner to Intel vTune. I wish to compare the cache performances of two versions of a Java application in an Intel Alderlake-S processor. I am a running my benchmarks on a Linux server which has vTune set up and ready. When I profile information using memory-access action I can't find specific sections relating to L1- cache misses or L2- cache misses in the report summary. I am specifically trying to measure the impact on cache for the applications. Is it the right action to use and is there separate knobs to enable these measurements?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We suggest you run the following commands to perform the analysis in Linux server machine using CLI.
1.To source the environment variables:
source /opt/intel/oneapi/setvars.sh
2.To collect data on memory access analysis:
vtune -collect memory-access -r <path of result directory> -- ./<name of the application>
For reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/run-memory-access-analysis-command-line.html
3.To get hardware events in CSV format:
vtune -report hw-events -result-dir <dir> -report-output <path/filename.csv> -format csv -csv-delimiter comma
- <dir> is the location of the result directory.
- <path/filename> is the PATH and filename of the report file to be created.
For reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/saving-and-formatting-reports.html
The hardware events "CYCLE_ACTIVITY.STALLS_L1D_MISS" and "CYCLE_ACTIVITY.STALLS_L2_MISS" are given as column names in the output CSV file. These features can be used to measure the impact on cache for the application.
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!
Regards,
Thasneem Vazim
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Please follow the instructions below to get information regarding L1- cache misses or L2- cache misses while profiling the application using Vtune Profiler.
- Run Vtune Profiler as administrator.
- Click on Configure Analysis option in the home page.
- Configure the analysis by following the screenshot below:
Once the data collection has ended, you can see the analysis results.
4. Please select “Hardware Events” option in the drop-down box as shown below.
In the Summary pane, you will be provided with a list of Hardware event types.
The hardware event "CYCLE_ACTIVITY.STALLS_L1D_MISS" counts the number of cycles during which the CPU was stalled in response to an L1 data cache miss. The "CYCLE_ACTIVITY.STALLS_L2_MISS" hardware event measures the number of cycles during which the processor was stalled due to an L2 cache miss.
These events may be used to discover cache misses-related performance issues and optimize the application's memory access pattern to reduce cache misses.
5. After you click on the required blue hyperlink in the above step you will be navigated to the Events Count window as follows:
For more information on hardware events, you can refer the below link.
https://perfmon-events.intel.com/ahybrid.html
We could also see that you’re trying to compare two results. Below are the steps to do the same:
- On Vtune Profiler Welcome page, you can click on the highlighted option:
2. Your comparison results would look like the screenshot attached below:
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!
Regards,
Thasneem Vazim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Thasneem,
Thanks for the detailed solution. The problem I am faced with is that I am running my analysis on a linux server machine as mentioned above (No GUI). So using CLI how do I enable the hardware events to profile?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We suggest you run the following commands to perform the analysis in Linux server machine using CLI.
1.To source the environment variables:
source /opt/intel/oneapi/setvars.sh
2.To collect data on memory access analysis:
vtune -collect memory-access -r <path of result directory> -- ./<name of the application>
For reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/run-memory-access-analysis-command-line.html
3.To get hardware events in CSV format:
vtune -report hw-events -result-dir <dir> -report-output <path/filename.csv> -format csv -csv-delimiter comma
- <dir> is the location of the result directory.
- <path/filename> is the PATH and filename of the report file to be created.
For reference: https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2023-0/saving-and-formatting-reports.html
The hardware events "CYCLE_ACTIVITY.STALLS_L1D_MISS" and "CYCLE_ACTIVITY.STALLS_L2_MISS" are given as column names in the output CSV file. These features can be used to measure the impact on cache for the application.
If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Thank you!
Regards,
Thasneem Vazim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Thasneem.
This seems to resolve my issue. Also is there a way I can get a summary of the hw event data rather than function-wise info?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The summary of the hardware event data can be obtained using the VTune backend.
Please find the commands below to access VTune backend and view the summary report.
1. To access VTune Profiler Server using specific TCP port, specify it with the --web-port option as given below:
vtune-backend --allow-remote-access --enable-server-profiling --web-port=8080
2. VTune Profiler Server outputs a URL to access the GUI. For the first run, the URL includes a one-time token. The output will look like the screenshot attached below.
3. Open the highlighted URL in a web browser.
4. Set a Passphrase in the Set Passphrase dialog box.
Now you will be redirected to VTune backend similar to GUI in the webpage as shown in the screenshot below:
5. Once the GUI is obtained, you can get the summary of hardware events by following the steps provided earlier in this thread.
As your initial issue is resolved and we have provided steps to view summary of hardware events, please let us know if we can discontinue monitoring this thread.
Regards,
Thasneem Vazim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Thasneem. This is much helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Regards,
Thasneem Vazim
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page