From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 4/5] libtracefs: New APIs for getting existing trace instance
Date: Tue, 19 Jan 2021 17:18:41 -0500 [thread overview]
Message-ID: <20210119171841.265844d3@gandalf.local.home> (raw)
In-Reply-To: <20210115050410.1194011-5-tz.stoyanov@gmail.com>
On Fri, 15 Jan 2021 07:04:09 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> +++ b/include/tracefs.h
> @@ -20,9 +20,12 @@ struct tracefs_instance;
>
> void tracefs_instance_free(struct tracefs_instance *instance);
> struct tracefs_instance *tracefs_instance_create(const char *name);
> +struct tracefs_instance *tracefs_instance_get(const char *tracing_dir,
> + const char *name);
I don't think I care for the "_get" name here because it doesn't get
anything, it allocates it. As below, we have functions with "_get" that
return something that already exists (and why it returns a "const" value).
I think the above should be called:
tracefs_instance_alloc()
?
-- Steve
> int tracefs_instance_destroy(struct tracefs_instance *instance);
> bool tracefs_instance_is_new(struct tracefs_instance *instance);
> const char *tracefs_instance_get_name(struct tracefs_instance *instance);
> +const char *tracefs_instance_get_trace_dir(struct tracefs_instance *instance);
> char *
> tracefs_instance_get_file(struct tracefs_instance *instance, const char *file);
> char *tracefs_instance_get_dir(struct tracefs_instance *instance);
> diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
next prev parent reply other threads:[~2021-01-19 22:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 5:04 [PATCH 0/5] New libtracefs APIs for trace options and trace dir Tzvetomir Stoyanov (VMware)
2021-01-15 5:04 ` [PATCH 1/5] libtracefs: New APIs for trace options Tzvetomir Stoyanov (VMware)
2021-01-19 21:12 ` Steven Rostedt
2021-01-15 5:04 ` [PATCH 2/5] libtracefs: Unit tests for tracing options APIs Tzvetomir Stoyanov (VMware)
2021-01-15 5:04 ` [PATCH 3/5] libtracefs: Add information about top tracing directory in instance structure Tzvetomir Stoyanov (VMware)
2021-01-15 5:04 ` [PATCH 4/5] libtracefs: New APIs for getting existing trace instance Tzvetomir Stoyanov (VMware)
2021-01-19 22:18 ` Steven Rostedt [this message]
2021-01-15 5:04 ` [PATCH 5/5] libtracefs: Unit tests for working with non default tracing dir Tzvetomir Stoyanov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210119171841.265844d3@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).