FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 01-24-2011, 08:35 AM
Lai Jiangshan
 
Default crash-trace-command: load id for different kernels

The id field of struct ftrace_event_call is different for kernels:

Old kernel uses ftrace_event_call.id
newer kernel uses ftrace_event_call.event.type

Change ftrace_get_event_type_id() and make it serves for different kernels.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/extensions/trace.c b/extensions/trace.c
index 3697108..1ad53c1 100755
--- a/extensions/trace.c
+++ b/extensions/trace.c
@@ -878,6 +878,15 @@ int ftrace_get_event_type_id(ulong call, int *id)
if (!inited) {
inited = 1;
id_offset = MEMBER_OFFSET("ftrace_event_call", "id");
+
+ if (id_offset < 0) {
+ /* id = call->event.type */
+ int f1 = MEMBER_OFFSET("ftrace_event_call", "event");
+ int f2 = MEMBER_OFFSET("trace_event", "type");
+
+ if (f1 >= 0 && f2 >= 0)
+ id_offset = f1 + f2;
+ }
}

if (id_offset < 0)

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 10:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org