92e16ee87374 ("instrument/daq: Add an explicit time column to the DAQ
measurements") added a time column to the DAQ measurements in order to
help correlate them with those of other collectors like
FtraceCollector. Sadly, FTrace uses CLOCK_BOOTTIME instead of
CLOCK_MONOTONIC by default. CLOCK_MONOTONIC is like CLOCK_BOOTTIME,
except that it stops when the device suspends, which is why I hadn't
spot the issue until now.
Switch to CLOCK_BOOTTIME to get the intended behaviour of the original
commit.
Add the monotonic clock time to the energy measurements to help
correlate the measurement with those of other collectors, like
FtraceCollector or LogcatCollector.
CFLAGS in the makefile were being specified incorrectly.
- the single quotes for forcing all options to be passed as a single
token by the shell.
- Specifying -static and -lc via -Wl is not needed.
This allows clients to use the instrument more easily from their code
if they were previously used to using an HWMON-style interface.
In order to provide the measurement, the existing readenergy binary
is updated and changed so that if no output option is specified then
we just print the current values and exit.
Signed-off-by: Chris Redpath <chris.redpath@arm.com>