From bf2bb2c5253bbfd08f780e472d351e96fc7359da Mon Sep 17 00:00:00 2001 From: Youngwan Kim Date: Wed, 30 May 2018 22:00:44 +0900 Subject: [PATCH] [COMMON] lib: dss: Add fields in dbg_snapshot_log for analyzer Change-Id: Ibad7fedc28e88b95a4fa4967ec44081acc2f934d Signed-off-by: Youngwan Kim --- lib/debug-snapshot-log.c | 2 ++ lib/debug-snapshot-log.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/debug-snapshot-log.c b/lib/debug-snapshot-log.c index b50d61545038..a51b18e24d5d 100644 --- a/lib/debug-snapshot-log.c +++ b/lib/debug-snapshot-log.c @@ -639,6 +639,7 @@ void dbg_snapshot_task(int cpu, void *v_task) dss_log->task[cpu][i].time = cpu_clock(cpu); dss_log->task[cpu][i].sp = (unsigned long)current_stack_pointer; dss_log->task[cpu][i].task = (struct task_struct *)v_task; + dss_log->task[cpu][i].pid = (int)((struct task_struct *)v_task)->pid; strncpy(dss_log->task[cpu][i].task_comm, dss_log->task[cpu][i].task->comm, TASK_COMM_LEN - 1); @@ -1096,6 +1097,7 @@ void dbg_snapshot_freq(int type, unsigned long old_freq, unsigned long target_fr dss_log->freq[i].time = cpu_clock(cpu); dss_log->freq[i].cpu = cpu; dss_log->freq[i].freq_name = dss_freq_name[type]; + dss_log->freq[i].type = type; dss_log->freq[i].old_freq = old_freq; dss_log->freq[i].target_freq = target_freq; dss_log->freq[i].en = en; diff --git a/lib/debug-snapshot-log.h b/lib/debug-snapshot-log.h index c9cb385ecc9d..d257aa9c4cf6 100644 --- a/lib/debug-snapshot-log.h +++ b/lib/debug-snapshot-log.h @@ -79,6 +79,7 @@ struct dbg_snapshot_log { void *task; #endif char task_comm[TASK_COMM_LEN]; + int pid; } task[DSS_NR_CPUS][DSS_LOG_MAX_NUM]; struct __work_log { @@ -204,6 +205,7 @@ struct dbg_snapshot_log { struct __freq_log { unsigned long long time; int cpu; + int type; char *freq_name; unsigned long old_freq; unsigned long target_freq; -- 2.20.1