From: Steven Rostedt <rostedt@goodmis.org>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH 2/3] kernel-shark-qt: Consolidate load_data_entries and load_data_records
Date: Thu, 5 Jul 2018 12:38:34 -0400 [thread overview]
Message-ID: <20180705123834.20af348d@gandalf.local.home> (raw)
In-Reply-To: <20180705123509.26f1c0c9@gandalf.local.home>
On Thu, 5 Jul 2018 12:35:09 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> Thanks for the review.
Here's a diff of the patch. Not counting the comment change in the
doxygen header, as I already rebased that.
-- Steve
diff --git a/kernel-shark-qt/src/libkshark.c b/kernel-shark-qt/src/libkshark.c
index 86bd8789..f7560404 100644
--- a/kernel-shark-qt/src/libkshark.c
+++ b/kernel-shark-qt/src/libkshark.c
@@ -514,6 +514,7 @@ static void free_rec_list(struct rec_list **rec_list, int n_cpus)
while (rec_list[cpu]) {
temp_rec = rec_list[cpu];
rec_list[cpu] = temp_rec->next;
+ free_record(temp_rec->rec);
free(temp_rec);
}
}
@@ -663,6 +664,7 @@ ssize_t kshark_load_data_entries(struct kshark_context *kshark_ctx,
temp_rec = rec_list[next_cpu];
rec_list[next_cpu] = rec_list[next_cpu]->next;
free(temp_rec);
+ /* The record is no longer be referenced */
free_record(rec);
}
}
@@ -742,10 +744,11 @@ ssize_t kshark_load_data_records(struct kshark_context *kshark_ctx,
temp_rec = rec_list[next_cpu];
rec_list[next_cpu] = rec_list[next_cpu]->next;
free(temp_rec);
- free_record(rec);
+ /* The record is still referenced in rows */
}
}
+ /* There should be no records left in rec_list */
free_rec_list(rec_list, n_cpus);
*data_rows = rows;
return total;
next prev parent reply other threads:[~2018-07-05 16:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 16:21 [PATCH 2/3] kernel-shark-qt: Consolidate load_data_entries and load_data_records Steven Rostedt
2018-07-04 11:39 ` Yordan Karadzhov (VMware)
2018-07-05 14:47 ` Steven Rostedt
2018-07-05 14:53 ` Yordan Karadzhov (VMware)
2018-07-05 15:48 ` Steven Rostedt
2018-07-05 16:08 ` Yordan Karadzhov (VMware)
2018-07-05 16:25 ` Steven Rostedt
2018-07-05 16:35 ` Steven Rostedt
2018-07-05 16:38 ` Steven Rostedt [this message]
2018-07-05 22:05 ` Steven Rostedt
2018-07-06 10:51 ` Yordan Karadzhov (VMware)
2018-07-06 11:36 ` Yordan Karadzhov (VMware)
2018-07-06 12:46 ` Yordan Karadzhov (VMware)
2018-07-06 18:21 ` Steven Rostedt
2018-07-06 18:43 ` Steven Rostedt
2018-07-09 15:54 ` Yordan Karadzhov (VMware)
2018-07-06 18:24 ` Steven Rostedt
2018-07-09 15:54 ` Yordan Karadzhov (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=20180705123834.20af348d@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=y.karadz@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).