Dwarves Archive on lore.kernel.org
 help / color / Atom feed
From: Arnaldo Carvalho de Melo <acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jiri Olsa <jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Joe Mario <jmario-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] dwarves print: Pass into struct conf_fprintf class__fprintf_cacheline_boundary
Date: Wed, 16 Dec 2015 15:00:17 -0300
Message-ID: <20151216180017.GC6843@kernel.org> (raw)
In-Reply-To: <1449614826-2278-3-git-send-email-jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

Em Tue, Dec 08, 2015 at 11:47:05PM +0100, Jiri Olsa escreveu:
> Passing into struct conf_fprintf class__fprintf_cacheline_boundary,
> so the next patch is more easy to read.

"Passing struct conf_fprintf to class__fprintf_cacheline_boundary(), so
the next patch is more easy to read."

?

> Signed-off-by: Jiri Olsa <jolsa-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  dwarves_fprintf.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/dwarves_fprintf.c b/dwarves_fprintf.c
> index df80af255c67..2d114210831a 100644
> --- a/dwarves_fprintf.c
> +++ b/dwarves_fprintf.c
> @@ -1122,7 +1122,8 @@ static size_t class__fprintf_cacheline_boundary(uint32_t last_cacheline,
>  						size_t sum, size_t sum_holes,
>  						uint8_t *newline,
>  						uint32_t *cacheline,
> -						int indent, FILE *fp)
> +						struct conf_fprintf *cconf,
> +						FILE *fp)
>  {
>  	const size_t real_sum = sum + sum_holes;
>  	size_t printed = 0;
> @@ -1139,7 +1140,7 @@ static size_t class__fprintf_cacheline_boundary(uint32_t last_cacheline,
>  			++printed;
>  		}
>  
> -		printed += fprintf(fp, "%.*s", indent, tabs);
> +		printed += fprintf(fp, "%.*s", cconf->indent, tabs);
>  
>  		if (cacheline_pos == 0)
>  			printed += fprintf(fp, "/* --- cacheline %u boundary "
> @@ -1287,7 +1288,7 @@ size_t class__fprintf(struct class *class, const struct cu *cu,
>  							      sum, sum_holes,
>  							      &newline,
>  							      &last_cacheline,
> -							      cconf.indent,
> +							      &cconf,
>  							      fp);
>  		/*
>  		 * These paranoid checks doesn't make much sense on
> @@ -1477,7 +1478,7 @@ size_t class__fprintf(struct class *class, const struct cu *cu,
>  							     sum, sum_holes,
>  							     &newline,
>  							     &last_cacheline,
> -							     cconf.indent, fp);
> +							     &cconf, fp);
>  	if (!cconf.show_only_data_members)
>  		class__vtable_fprintf(class, cu, &cconf, fp);
>  
> -- 
> 2.4.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dwarves" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 22:47 [RFC/PATCH 0/3] dwarves print: Cacheline accounting fixes Jiri Olsa
     [not found] ` <1449614826-2278-1-git-send-email-jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-08 22:47   ` [PATCH 1/3] dwarves print: Fix holes accounting Jiri Olsa
     [not found]     ` <1449614826-2278-2-git-send-email-jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-16 17:58       ` Arnaldo Carvalho de Melo
     [not found]         ` <20151216175839.GB6843-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-16 18:05           ` Arnaldo Carvalho de Melo
     [not found]             ` <20151216180532.GD6843-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-16 18:10               ` Arnaldo Carvalho de Melo
2015-12-08 22:47   ` [PATCH 2/3] dwarves print: Pass into struct conf_fprintf class__fprintf_cacheline_boundary Jiri Olsa
     [not found]     ` <1449614826-2278-3-git-send-email-jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-16 18:00       ` Arnaldo Carvalho de Melo [this message]
     [not found]         ` <20151216180017.GC6843-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-17  9:17           ` Jiri Olsa
2015-12-08 22:47   ` [PATCH 3/3] dwarves print: Keep global cacheline in struct conf_fprintf Jiri Olsa
     [not found]     ` <1449614826-2278-4-git-send-email-jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2015-12-16 18:29       ` Arnaldo Carvalho de Melo
2015-12-16 16:57   ` [RFC/PATCH 0/3] dwarves print: Cacheline accounting fixes Jiri Olsa

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=20151216180017.GC6843@kernel.org \
    --to=acme-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jmario-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jolsa-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
		dwarves@vger.kernel.org
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dwarves


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git