I am trying to profile a C program I've made of pagerank for an assignment. I have a mac so can't use gprof so have checked out the xcode instruments application. I have loaded the target as the C executable.
I compiled my C program with this makefile:
CC = clang
CFLAGS = -g -O1 -Wall -Werror -std=gnu11 -march=native
LDFLAGS = -lm -pthread
.PHONY: all clean
all: pagerank
pagerank: pagerank.c
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
clean:
-rm -f *.o
-rm -f pagerank
-rm -rf *.dSYM
The issue is that I press the record button and it starts and stops instantly. The count of runs increments each time as if it had successfully run.
I am unsure what I am meant to do differently. My understanding was that I would point the target to my executable, hit record and then go into terminal and run a test however this doesn't seem to work.