Re: [PATCH V9 01/16] rv: Add Runtime Verification (RV) interface

From: Tao Zhou
Date: Sat Jul 30 2022 - 18:05:53 EST


On Sat, Jul 30, 2022 at 01:01:45PM -0400, Steven Rostedt wrote:
> #define rv_attach_trace_probe(monitor, tp, rv_handler) \
> ({ \
> check_trace_callback_type_##tp(rv_handler); \
> WARN_ONCE(register_trace_##tp(rv_handler, NULL), \
> "fail attaching " #monitor " " #tp "handler"); \
> })
>
> Where the macro returns the result of the WARN_ONCE() which is zero on
> success (no warning) and non-zero otherwise.

The modification of macro make sense to me even though I do not know trace enough. Thanks,