|
@@ -66,44 +66,47 @@ static void __used ____ftrace_check_##name(void) \
|
|
|
#undef __field
|
|
|
#define __field(type, item) \
|
|
|
ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
|
|
|
- "offset:%zu;\tsize:%zu;\n", \
|
|
|
+ "offset:%zu;\tsize:%zu;\tsigned:%u;\n", \
|
|
|
offsetof(typeof(field), item), \
|
|
|
- sizeof(field.item)); \
|
|
|
+ sizeof(field.item), is_signed_type(type)); \
|
|
|
if (!ret) \
|
|
|
return 0;
|
|
|
|
|
|
#undef __field_desc
|
|
|
#define __field_desc(type, container, item) \
|
|
|
ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
|
|
|
- "offset:%zu;\tsize:%zu;\n", \
|
|
|
+ "offset:%zu;\tsize:%zu;\tsigned:%u;\n", \
|
|
|
offsetof(typeof(field), container.item), \
|
|
|
- sizeof(field.container.item)); \
|
|
|
+ sizeof(field.container.item), \
|
|
|
+ is_signed_type(type)); \
|
|
|
if (!ret) \
|
|
|
return 0;
|
|
|
|
|
|
#undef __array
|
|
|
#define __array(type, item, len) \
|
|
|
ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \
|
|
|
- "offset:%zu;\tsize:%zu;\n", \
|
|
|
- offsetof(typeof(field), item), \
|
|
|
- sizeof(field.item)); \
|
|
|
+ "offset:%zu;\tsize:%zu;\tsigned:%u;\n", \
|
|
|
+ offsetof(typeof(field), item), \
|
|
|
+ sizeof(field.item), is_signed_type(type)); \
|
|
|
if (!ret) \
|
|
|
return 0;
|
|
|
|
|
|
#undef __array_desc
|
|
|
#define __array_desc(type, container, item, len) \
|
|
|
ret = trace_seq_printf(s, "\tfield:" #type " " #item "[" #len "];\t" \
|
|
|
- "offset:%zu;\tsize:%zu;\n", \
|
|
|
+ "offset:%zu;\tsize:%zu;\tsigned:%u;\n", \
|
|
|
offsetof(typeof(field), container.item), \
|
|
|
- sizeof(field.container.item)); \
|
|
|
+ sizeof(field.container.item), \
|
|
|
+ is_signed_type(type)); \
|
|
|
if (!ret) \
|
|
|
return 0;
|
|
|
|
|
|
#undef __dynamic_array
|
|
|
#define __dynamic_array(type, item) \
|
|
|
ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
|
|
|
- "offset:%zu;\tsize:0;\n", \
|
|
|
- offsetof(typeof(field), item)); \
|
|
|
+ "offset:%zu;\tsize:0;\tsigned:%u;\n", \
|
|
|
+ offsetof(typeof(field), item), \
|
|
|
+ is_signed_type(type)); \
|
|
|
if (!ret) \
|
|
|
return 0;
|
|
|
|