Professional Documents
Culture Documents
Agenda
Assignment #3
DPRNTF
Stats
Stopwatch
External Tools
Profiling perf
Guidelines
Assignment #3
Fileops layer
_open(), _read(), _getchar(), _close()
Tools available:
DPRNTF
Stat counters
Stopwatch
TooI - Debug printf
Example in scan.c
DPRINTF('s', ("Scan_Pathname(%s)\n", pathname));
DPRINTF('s',("Scan_Pathname discard dup (%s)\n", inpathname));
nvoke: ./disksearch -d s .
Trace execution
Example in scan.c
static long long numfiles, .., numdups, ..;
pathname = Pathstore_path(store,inpathname,discardDups);
if (pathname == NULL) {
numdups++;
return 0;
}
numfiles++;
Scan_dumpstats(FLE *file)
Some stats
Need to do fewer /O
TooI - perf
Demo!
Modification guideIines
Exceptions: