0% found this document useful (0 votes)
15 views2 pages

Lab 11 A ProgramAnalysis

Uploaded by

f20221259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Lab 11 A ProgramAnalysis

Uploaded by

f20221259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab.

Assignment-11 (a)

Computer Architecture (CS F342)


Semester-I, 2024-25
Department of Computer Science and Information Systems (CSIS)
BITS-Pilani, K K Birla Goa Campus, Goa, India.

Due date: Nov 8, 2023: 2:59 PM Marks: 15

Profiling with VTune


Find out the following for “matrix_multi.cpp” and “quicksort.cpp”:
Compile each of the files with the following compiler flags: (Marks: 0.5*2)
-g (Enable debugging)
-O2 (Enable high compiler optimization)

Performance Snapshot (Marks: 1+1+1)

 What is the IPC that you have observed?


 What logical core utilization and physical core utilization have you observed?
 What % of the pipeline slots are memory-bound?
Hotspots (Marks: 2 + 2)

 List down the top hotspots that were identified, along with their CPU time.
 Identify and list down the statements in the program’s source code (ignore the ones that are from
source code of the libraries) that were responsible for consuming most of the CPU time (in
descending order of the % of CPU time consumed. Make sure to note down the % as well)
Summarize all the results that you have obtained, along with screenshots of the results in the report, PDF
file.

Analysis using Performance Counters (Perf)


For this lab, we will use the Linux perf tool to extract hardware performance counter information. Take a
look through this tutorial:
https://perf.wiki.kernel.org/index.php/Tutorial
Find out the following for “add.c”:

 Find out branch misses by using the perf tool. (Marks: 1)


 Modify the code by inserting the macro provided by GCC for branches likely or unlikely to be
taken. (Marks: 2)
 Modify the code in such a way that reduces the branch misses. (Marks: 2)
 Modify the code for performing the addition operation without having the “if (vec[i] > n/2)”
statement; it does not mean performing the addition of all the elements and reporting the
branch misses. (Marks: 2)
Summarize all the results that you have obtained, along with screenshots of the results in the report, PDF
file.

1
Instructions for uploading the results:
Download the CA_Lab-11_Template.zip and rename the folder as <CampusID>_ CA_Lab-11. Output must
be stored as <CampusID>_ VTune.pdf (VTune folder) and <CampusID>_ CA_Lab-11_Perf.pdf (Perf
folder) in the folder. Create a zip file <CampusID>_ CA_Lab-11.zip which contains all the files mentioned
above, and submit it in Quanta. Do not create archives in other formats (rar, tar.gz etc). Once uploaded on
Quanta, remember to submit for grading. Do not leave it as a draft.
/*###################################################################################
Note: Please don’t upload the assignments, template file/solution and lab. manual on GitHub or
others public repository.
Kindly remove them, if you have uploaded the previous assignments.
It violates the BITS’s Intellectual Property Rights (IPR).
************************************************************************************/

You might also like