aboutsummaryrefslogtreecommitdiff
path: root/libraries/libprof/Makefile
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2018-11-26 17:26:55 -0500
committerPaul Selkirk <paul@psgd.org>2018-11-26 17:27:58 -0500
commit97034edb35e92361daaa24512989d00f6c3fd517 (patch)
treec908bc4b4347d21bbdb776aef69f30936c4e4898 /libraries/libprof/Makefile
parent23850319664533c42c5c60d1e91277358d07dd63 (diff)
Add loop unrolling to bring the profilable mem* functions closer to
newlib, because memset is called a LOT in the course of RSA signing, and we need to understand how much time we're actually spending there.
Diffstat (limited to 'libraries/libprof/Makefile')
-rw-r--r--libraries/libprof/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/libraries/libprof/Makefile b/libraries/libprof/Makefile
index 4fe5fb4..37b9a23 100644
--- a/libraries/libprof/Makefile
+++ b/libraries/libprof/Makefile
@@ -1,12 +1,16 @@
LIB = libprof.a
-OBJS = gmon.o profil.o profiler.o
+OBJS = gmon.o profil.o profiler.o memfunc.o
# Don't profile the profiling code, because that way lies madness (and recursion).
CFLAGS := $(subst -pg,,$(CFLAGS))
all: $(LIB)
+# But do profile the mem functions
+memfunc.o: memfunc.c
+ $(CC) $(CFLAGS) -pg -c -o $@ $<
+
%.o : %.c
$(CC) $(CFLAGS) -c -o $@ $<