Computer Systems Programming

ECE454, Fall 2026
University of Toronto
Instructor: Ashvin Goel

    Computer Systems Programming

ECE454 Lab 1 FAQ


Q: I get the error "submitece454f Command not found"

A: Try /local/bin/submitece454f. Alternatively, add "/local/bin" to your shell init file as follows:

echo $SHELL

If the shell is tcsh, add the following line to the bottom of the .tcshrc file:

set path = ( $path /local/bin )

If the shell is bash, add the following line to the bottom of the .bashrc file:

export PATH=$PATH:/local/bin

Then exit the login session and relogin. Now the submitece454f command should work without typing the full pathname.


Q: In this section, we are asked to run gcov to "get the per-line execution counts of the top function from the -O3 version", but also asked to build the gcov version using -g. I'm confused on this because the top function in -O3 is rarely used in -g. Are we being asked to analyze the top function of -g instead? The top functions in -O3 and -g are also in different files, so it would also affect how Q17 is answered.

A: You should analyze the top function from the -O3 profiling run using gcov. The gcov version should be built using the -g flag, not the -O3 flag (which shows confusing results due to the compiler optimizations).


Q: The run time performance and CPU cycles vary significantly across runs. Why is that?

A: Measure time on a physical machine where there other compute-heavy tasks are not running. Running on a shared server increases variation.

Be careful about the first (cold) run. When you first run a program, it tends to be slower because of incorrect branch predictions, page cache misses, etc. It is better to run the program 1-3 times in advance as warm up before you run the 5 executions and collect the data, unless you specifically want to measure the cold run time.

You can also report the average across more than 5 (e.g., 20) runs.