aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2014-12-08 16:59:47 +0200
committerTuukka Tikkanen <tuukka.tikkanen@linaro.org>2014-12-12 08:56:44 +0200
commit55ecf2a4a7949ff323aaa7570744f845c2d5b731 (patch)
treed38aaa6b621af53c0f2f3ea7790d6b890bafd2d2 /Makefile
parent663342ed3364d4855a967be5ebe680bb2b3ffdcf (diff)
idlestat: Separate loading of different trace file formats
This patch separates loading of different trace file formats to independent functions. In order to call the correct function for each trace file processed, each load function comes with a match function. Pointers to these functions are stored in a new struct trace_ops. In order to avoid static lists of trace file formats (e.g. implemented as static arrays or a number of registration function calls in main), pointers to all trace_ops structures are collected by the linker into a private segment. This creates an implicit array of the pointers, which may then be enumerated starting right after a globally linked element trace_ops_head. A sentinel NULL pointer trails the array. A helper macro EXPORT_TRACE_OPS is added for creating the special pointers. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Reviewed-by: Koan-Sin Tan <freedom.tan@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e83130e..0de28be 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,11 @@ CFLAGS?=-g -Wall
CC=gcc
OBJS = idlestat.o topology.o trace.o utils.o energy_model.o \
- default_report.o csv_report.o
+ default_report.o csv_report.o \
+ trace_ops_head.o \
+ tracefile_idlestat.o \
+ tracefile_ftrace.o \
+ trace_ops_tail.o
default: idlestat