# Re: \[PATCH 03/10\] rv: Add infrastructure for linear temporal logic monitor

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2025-03-12 09:56:59 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/03/2968092
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/03/2967169/t.md

```text
On Wed, 12 Mar 2025 07:47:50 +0100
Gabriele Monaco [ref] wrote:

>  -/*
> > - * Futher monitor types are expected, so make this a union.
> > - */
> >  union rv_task_monitor {
> > -	struct da_monitor da_mon;
> > +	struct da_monitor	da_mon;
> > +	struct ltl_monitor	ltl_mon;
> >  };  
> 
> This adds quite some memory overhead if we have multiple per-task
> monitors (we might in the future) and we don't use this ltl monitors.
> What about keeping it conditionally compiled out?
> You could define the struct only if e.g. CONFIG_RV_LTL_MONITORS is set,
> select it with any LTL monitor via Kconfig, then glue it somehow to
> have it readable.

One thing to do if you compile it out, make it a stub structure, so you
don't need to add #ifdef into the union.

struct ltl_monitor { int unused; };

Or something like that.

-- Steve
```
