| 1 | The +{macro-name}()+ and +v{macro-name}()+ utility macros were |
| 2 | developed to make user space tracing super simple, albeit with notable |
| 3 | disadvantages compared to custom, full-fledged tracepoint providers: |
| 4 | |
| 5 | * All generated events have the same provider/event names. |
| 6 | * There's no static type checking. |
| 7 | * The only event field with user data you actually get, named `msg`, |
| 8 | is a string potentially containing the values you passed to the |
| 9 | macro using your own format. This also means that you cannot use |
| 10 | filtering using a custom expression at run time because there are no |
| 11 | isolated fields. |
| 12 | * Since +{macro-name}()+ and +v{macro-name}()+ use C standard |
| 13 | library's man:vasprintf(3) function in the background to format the |
| 14 | strings at run time, their expected performance is lower than using |
| 15 | custom tracepoint providers with typed fields, which do not require |
| 16 | a conversion to a string. |
| 17 | * Generally, a string containing the textual representation of the |
| 18 | user data fields is not as compact as binary fields in the resulting |
| 19 | trace. |
| 20 | |
| 21 | Thus, +{macro-name}()+/+v{macro-name}()+ are useful for quick |
| 22 | prototyping and debugging, but should not be considered for any |
| 23 | permanent/serious application instrumentation. |
| 24 | |
| 25 | +v{macro-name}()+ does not have a `STAP_PROBEV()` call, because |
| 26 | `STAP_PROBEV()` does not support `va_list`. If you need it, you should |
| 27 | emit this call yourself. |
| 28 | |
| 29 | See man:lttng-ust(3) to learn more about custom tracepoint providers. |