Re: RAS trace event proto

From: Steven Rostedt
Date: Wed Feb 22 2012 - 09:26:36 EST


On Wed, 2012-02-22 at 11:32 -0200, Mauro Carvalho Chehab wrote:

> @Steven:
>
> In a matter of fact, the error_severity and error_type should be enum's. We should not
> use enum's on ioctl's, as enum size is not portable. Can it be used inside perf, or should
> them be exported, on perf, via integer (like the above proposal)?

I don't know exactly how perf does it today, but I'm sure it's similar
to trace-cmd.

You can use an enum, as it just comes through as a number. Each field is
given the size of that field. If it's an int it stays an int.

Note though, perf and trace-cmd do not know how to convert the number
back to a enum name. You can use the __print_symbols() feature, but
that's about it.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/