Re: [PATCH 7/7] kernel-shark-qt: Add a plugin for sched events.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 29 Aug 2018 22:43:12 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

 +				      const struct kshark_entry *e)
> > +{
> > +	struct plugin_sched_context *plugin_ctx;
> > +	struct tep_record *record;
> > +	unsigned long long val;
> > +
> > +	plugin_ctx = plugin_sched_context_handler;
> > +	record = kshark_read_at(kshark_ctx, e->offset);
> > +
> > +	tep_read_number_field(plugin_ctx->sched_wakeup_pid_field,
> > +				 record->data, &val);
> > +	free(record);  
> 
> Records must be freed with:
> 
> 	free_record(record);
> 
> Which also looks like we missed a function that needs to be converted.
> tep_free_record()?

Actually I'm wrong here. Although it should be renamed, but not
tep_free_record(), but tracecmd_free_record() because kshark_read_at()
calls tracecmd_read_at() not tep_read_at(). And "free_record()" is part
of the libtracecmd library not libtraceevent.

Nothing needs to be done about this now.

Sorry for the noise, Ceco.

-- Steve

> 
> or should we have it be free_tep_record(), although, I'm not sure I
> like this breaking from the prefix way.
> 



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux