diff mbox series

[v2,06/87] trace-cmd library: Add constructor and destructor

Message ID 20210729050959.12263-7-tz.stoyanov@gmail.com (mailing list archive)
State Superseded
Headers show
Series Trace file version 7 | expand

Commit Message

Tzvetomir Stoyanov (VMware) July 29, 2021, 5:08 a.m. UTC
Added empty constructor and destructor routines of the trace-cmd
library. They will be used to initialize and free compression context of
the library.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 lib/trace-cmd/trace-util.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Steven Rostedt July 29, 2021, 8:06 p.m. UTC | #1
On Thu, 29 Jul 2021 08:08:38 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:

> Added empty constructor and destructor routines of the trace-cmd
> library. They will be used to initialize and free compression context of
> the library.

This should be folded into the first patch they are used. Patches
should not be broken into just adding skeletons without usage.

-- Steve


> 
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> ---
>  lib/trace-cmd/trace-util.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
> index b0c98c72..0f49a21a 100644
> --- a/lib/trace-cmd/trace-util.c
> +++ b/lib/trace-cmd/trace-util.c
> @@ -624,3 +624,13 @@ bool tracecmd_is_version_supported(unsigned int version)
>  		return true;
>  	return false;
>  }
> +
> +static void __attribute__ ((constructor)) tracecmd_lib_init(void)
> +{
> +
> +}
> +
> +static void __attribute__((destructor)) tracecmd_lib_free(void)
> +{
> +
> +}
diff mbox series

Patch

diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
index b0c98c72..0f49a21a 100644
--- a/lib/trace-cmd/trace-util.c
+++ b/lib/trace-cmd/trace-util.c
@@ -624,3 +624,13 @@  bool tracecmd_is_version_supported(unsigned int version)
 		return true;
 	return false;
 }
+
+static void __attribute__ ((constructor)) tracecmd_lib_init(void)
+{
+
+}
+
+static void __attribute__((destructor)) tracecmd_lib_free(void)
+{
+
+}