lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 4/7] perf diff: Use hists to manage basic blocks per symbol
On Thu, Jun 20, 2019 at 10:36:39PM +0800, Jin Yao wrote:

SNIP

> +
> +static void *block_entry_zalloc(size_t size)
> +{
> + return zalloc(size + sizeof(struct hist_entry));
> +}
> +
> +static void block_entry_free(void *he)
> +{
> + struct block_info *bi = ((struct hist_entry *)he)->block_info;
> +
> + block_info__put(bi);
> + free(he);
> +}
> +
> +struct hist_entry_ops block_entry_ops = {
> + .new = block_entry_zalloc,
> + .free = block_entry_free,
> +};

hum, so there's already block_hist_ops moving that stuff into 'struct block_hist',
which is great, but why don't we have 'struct block_entry' in here? that would
keep the 'struct block_info'

thanks,
jirka

\
 
 \ /
  Last update: 2019-06-24 09:57    [W:0.099 / U:3.492 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site