From: Imran Navruzbekov Date: Tue, 6 Nov 2012 11:26:18 +0000 (+0400) Subject: Added an output both of variable name and variable in fbi mode. X-Git-Tag: Tizen_SDK_2.3~752 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=785e68997711a3c0cf785dc1416f838c82a18574;p=kernel%2Fswap-modules.git Added an output both of variable name and variable in fbi mode. --- diff --git a/driver/storage.c b/driver/storage.c index 5bf1976..86901be 100644 --- a/driver/storage.c +++ b/driver/storage.c @@ -1394,6 +1394,7 @@ int link_bundle() return -EFAULT; } //vtp_data->name[len] = 0;*/ + vtp_data->name = s_vtp->name; vtp_data->type = s_vtp->type; vtp_data->size = s_vtp->size; vtp_data->reg = s_vtp->reg; diff --git a/driver/storage.h b/driver/storage.h index 5541628..937d5ed 100644 --- a/driver/storage.h +++ b/driver/storage.h @@ -176,7 +176,7 @@ typedef struct typedef struct { - //char *name; + char *name; char type; unsigned long size; signed char reg; // -1 - memory, 0..127 - register number diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index f326b29..13f7a57 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -473,14 +473,15 @@ static void us_vtp_event_handler (unsigned long arg1, unsigned long arg2, unsign #if !defined(CONFIG_X86) struct pt_regs *regs = __get_cpu_var(gpCurVtpRegs); #endif - char fmt[3]; + char fmt[4]; unsigned long vaddr; long ival; char cval, *sval; us_proc_vtp_data_t *vtp_data; - +unsigned long ll; fmt[0] = 'p'; - fmt[2] = 0; + fmt[3] = 0; + fmt[2] = 's'; list_for_each_entry_rcu (vtp_data, &vtp->list, list) { // DPRINTF ("[%d]proc %s(%d): %lx", nCount++, current->comm, current->pid, vtp->addr); @@ -498,19 +499,19 @@ static void us_vtp_event_handler (unsigned long arg1, unsigned long arg2, unsign if (read_proc_vm_atomic (current, vaddr, &ival, sizeof (ival)) < sizeof (ival)) EPRINTF ("failed to read vm of proc %s/%u addr %lu!", current->comm, current->pid, vaddr); else - pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, ival); + pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, ival, vtp_data->name); break; case 'f': if (read_proc_vm_atomic (current, vaddr, &ival, sizeof (ival)) < sizeof (ival)) EPRINTF ("failed to read vm of proc %s/%u addr %lu!", current->comm, current->pid, vaddr); else - pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, ival); + pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, ival, vtp_data->name); break; case 'c': if (read_proc_vm_atomic (current, vaddr, &cval, sizeof (cval)) < sizeof (cval)) EPRINTF ("failed to read vm of proc %s/%u addr %lu!", current->comm, current->pid, vaddr); else - pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, cval); + pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, cval, vtp_data->name); break; case 's': if (current->active_mm) { @@ -529,7 +530,7 @@ static void us_vtp_event_handler (unsigned long arg1, unsigned long arg2, unsign EPRINTF ("failed to alloc memory for string in proc %s/%u addr %lu!", current->comm, current->pid, vaddr); else { copy_from_user_page (vma, page, vaddr, sval, maddr + (vaddr & ~PAGE_MASK), len + 1); - pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, sval); + pack_event_info (VTP_PROBE_ID, RECORD_ENTRY, fmt, vtp->jprobe.kp.addr, sval, vtp_data->name); kfree (sval); } kunmap_atomic (maddr, KM_USER0);