From f601fa8637854bc3f34d1388e2ec9506d9970264 Mon Sep 17 00:00:00 2001 From: Youngwan Kim Date: Thu, 31 May 2018 18:28:09 +0900 Subject: [PATCH] [COMMON] lib: dss: Modify dss-reader to get additional fields Change-Id: I218af6fbeb1d6a9e2d985771059ce5ad8dc936ea Signed-off-by: Youngwan Kim --- lib/dss-reader.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/dss-reader.c b/lib/dss-reader.c index 9e981a176bc2..2fd40f60fbd3 100644 --- a/lib/dss-reader.c +++ b/lib/dss-reader.c @@ -27,24 +27,34 @@ int main(int argc, char *argv[]) printf("log = {}\n"); for (i = 0; i < DSS_NR_CPUS; i++) { for (j = 0; j < DSS_LOG_MAX_NUM; j++) { - printf("log[%.9f] = { 'type' : 'sched', 'cpu' : %d, 'comm' : '%s'}\n", - p->task[i][j].time/1.0e9, i, p->task[i][j].task_comm); + printf("log[%.9f] = { 'type' : 'sched', 'cpu' : %d, 'comm' : '%s', 'pid' : %d}\n", + p->task[i][j].time/1.0e9, + i, + p->task[i][j].task_comm, + p->task[i][j].pid); if (p->task[i][j].time == 0) break; } } for (i = 0; i < DSS_LOG_MAX_NUM; i++) { - printf("log[%.9f] = { 'type' : 'freq', 'cpu' : %d, 'freq' : %lu }\n", - p->freq[i].time/1.0e9, p->freq[i].cpu, p->freq[i].target_freq); + printf("log[%.9f] = { 'type' : 'freq', 'cluster' : %d, 'freq' : %lu }\n", + p->freq[i].time/1.0e9, + p->freq[i].type, + p->freq[i].target_freq); if (p->freq[i].time == 0) break; } for (i = 0; i < DSS_NR_CPUS; i++) { for (j = 0; j < DSS_LOG_MAX_NUM; j++) { - printf("log[%.9f] = { 'type' : 'irq', 'cpu' : %d, 'num' : '%d'}\n", - p->irq[i][j].time/1.0e9, i, p->irq[i][j].irq); + printf("log[%.9f] = { 'type' : 'irq', 'cpu' : %d, 'num' : %d," + "'en' : %d, 'func' : '%p'}\n", + p->irq[i][j].time/1.0e9, + i, + p->irq[i][j].irq, + p->irq[i][j].en, + p->irq[i][j].fn); if (p->irq[i][j].time == 0) break; } @@ -52,8 +62,10 @@ int main(int argc, char *argv[]) for (i = 0; i < DSS_NR_CPUS; i++) { for (j = 0; j < DSS_LOG_MAX_NUM; j++) { - printf("log[%.9f] = { 'type' : 'cpuidle', 'cpu' : %d, 'state' : '%d'}\n", - p->cpuidle[i][j].time/1.0e9, i, p->cpuidle[i][j].state); + printf("log[%.9f] = { 'type' : 'cpuidle', 'cpu' : %d, 'state' : %d}\n", + p->cpuidle[i][j].time/1.0e9, + i, + p->cpuidle[i][j].state); if (p->cpuidle[i][j].time == 0) break; } -- 2.20.1