]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Makefile: add perf section
authorJaroslav Kysela <perex@perex.cz>
Fri, 23 Mar 2018 16:53:23 +0000 (17:53 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 23 Mar 2018 16:53:23 +0000 (17:53 +0100)
Makefile

index df981ca3b133d10529e20ce539a8b69cecca4f18..e796073c289bc467facf2dd1126c3d8983b2ede4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -901,3 +901,24 @@ $(ROOTDIR)/data/dvb-scan/dvb-s/.stamp: $(ROOTDIR)/data/satellites.xml \
 
 .PHONY: satellites_xml
 satellites_xml: $(ROOTDIR)/data/dvb-scan/dvb-s/.stamp
+
+#
+# perf
+#
+
+PERF_DATA = /tmp/tvheadend.perf.data
+PERF_SLEEP ?= 30
+
+$(PERF_DATA): FORCE
+       perf record -F 16000 -g -p $$(pidof tvheadend) -o $(PERF_DATA) sleep $(PERF_SLEEP)
+
+.PHONY: perf-record
+perf-record: $(PERF_DATA)
+
+.PHONY: perf-graph
+perf-graph:
+       perf report --stdio -g graph -i $(PERF_DATA)
+
+.PHONY: perf-report
+perf-report:
+       perf report --stdio -g none -i $(PERF_DATA)