From 7cead055c66bd78f6772a4b48d071bc4f0d38577 Mon Sep 17 00:00:00 2001 From: Vasiliy Ulyanov Date: Tue, 10 Apr 2012 15:37:23 +0400 Subject: [PATCH] New MEC implementation (memory_leaks_only mode) --- driver/us_proc_inst.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driver/us_proc_inst.c b/driver/us_proc_inst.c index 29d0599..434020e 100644 --- a/driver/us_proc_inst.c +++ b/driver/us_proc_inst.c @@ -1500,14 +1500,16 @@ EXPORT_SYMBOL_GPL(get_stack); static int dump_to_trace(void *addr, const char *buf, unsigned long sz) { unsigned long rest_sz = sz; + char *data = buf; while (rest_sz >= EVENT_MAX_SIZE) { - pack_event_info(US_PROBE_ID, RECORD_ENTRY, "pa", addr, EVENT_MAX_SIZE, buf); + pack_event_info(US_PROBE_ID, RECORD_ENTRY, "pa", addr, EVENT_MAX_SIZE, data); rest_sz -= EVENT_MAX_SIZE; + data += EVENT_MAX_SIZE; } if (rest_sz > 0) { - pack_event_info(US_PROBE_ID, RECORD_ENTRY, "pa", addr, rest_sz, buf); + pack_event_info(US_PROBE_ID, RECORD_ENTRY, "pa", addr, rest_sz, data); } return 0; -- 2.7.4