From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v4 4/5] trace-cmd: Add validation for reading and writing trace.dat files
Date: Fri, 26 Feb 2021 14:43:02 -0500 [thread overview]
Message-ID: <20210226144302.5553d704@gandalf.local.home> (raw)
In-Reply-To: <20210226121306.216757-5-tz.stoyanov@gmail.com>
On Fri, 26 Feb 2021 14:13:05 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
> @@ -1409,7 +1497,6 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd)
> {
> struct tracecmd_output *handle = NULL;
> struct tracecmd_input *ihandle;
> - struct tep_handle *pevent;
> int fd2;
>
> /* Move the file descriptor to the beginning */
> @@ -1425,6 +1512,7 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd)
> ihandle = tracecmd_alloc_fd(fd2, TRACECMD_FL_LOAD_NO_PLUGINS);
> if (!ihandle)
> return NULL;
> + tracecmd_read_headers(ihandle);
>
> /* move the file descriptor to the end */
> if (lseek(fd, 0, SEEK_END) == (off_t)-1)
> @@ -1437,11 +1525,11 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd)
>
> handle->fd = fd;
>
> - /* get endian and page size */
> - pevent = tracecmd_get_tep(ihandle);
Actually this clean up of removing the duplicate pevent should have been a
separate patch as well. I'll take this as is (as the patches seem to be
solid), but for the future, try to keep small clean ups like this as
separate patches. One advantage is, if someone is supporting an older
version of trace-cmd, they may want to backport the clean up, but not the
feature.
-- Steve
next prev parent reply other threads:[~2021-02-26 19:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 12:13 [PATCH v4 0/5] Fix listener and add trace file validation Tzvetomir Stoyanov (VMware)
2021-02-26 12:13 ` [PATCH v4 1/5] trace-cmd Add API to save command lines in trace file Tzvetomir Stoyanov (VMware)
2021-02-26 12:13 ` [PATCH v4 2/5] trace-cmd: Update long size in the tep handler right after it is read from the " Tzvetomir Stoyanov (VMware)
2021-02-26 12:13 ` [PATCH v4 3/5] trace-cmd: Do not use trace plugins when reading partial trace files Tzvetomir Stoyanov (VMware)
2021-02-26 12:13 ` [PATCH v4 4/5] trace-cmd: Add validation for reading and writing trace.dat files Tzvetomir Stoyanov (VMware)
2021-02-26 19:43 ` Steven Rostedt [this message]
2021-02-26 12:13 ` [PATCH v4 5/5] trace-cmd: Fix broken listener and add error checks 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=20210226144302.5553d704@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).