benchmark: change format of ts file to yaml
1. Use libyaml to generate timestamp dump file in YAML format.
2. Misc cosmetic changes and refactoring (debug output).
Example of ts file:
timestamps:
- core: 0
counter: 5818870656
address: 0x804d01f0
component: kmodule
- core: 0
counter: 5819087360
address: 0xe01d81b
component: core
...
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
diff --git a/benchmark_aux.c b/benchmark_aux.c
index b97c213..90e8e62 100644
--- a/benchmark_aux.c
+++ b/benchmark_aux.c
@@ -33,12 +33,12 @@
#include <unistd.h>
#include "benchmark_aux.h"
+#include "common.h"
/* Misc auxilary functions */
void tee_errx(const char *msg, TEEC_Result res)
{
- fprintf(stderr, "%s: 0x%08x\n", msg, res);
- exit(1);
+ ERROR_EXIT("%s: 0x%08x\n", msg, res);
}
void tee_check_res(TEEC_Result res, const char *errmsg)
@@ -51,17 +51,15 @@
{
switch (source) {
case TEE_BENCH_CORE:
- return "CORE";
+ return "core";
case TEE_BENCH_KMOD:
- return "KMOD";
+ return "kmodule";
case TEE_BENCH_CLIENT:
- return "CLIENT";
+ return "libteec";
case TEE_BENCH_UTEE:
- return "UTEE";
- case TEE_BENCH_DUMB_TA:
- return "DUMB_TA";
+ return "libutee";
default:
- return "???";
+ return "-";
}
}