mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Josef Bacik <jbacik@fb.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-team@fb.com>
Subject: Re: [PATCH V2] trace-cmd: add option to group like comms for profile
Date: Wed, 24 Jun 2015 23:39:22 -0400	[thread overview]
Message-ID: <20150624233922.47b9ecbb@grimm.local.home> (raw)
In-Reply-To: <1432229408-1479-1-git-send-email-jbacik@fb.com>

On Thu, 21 May 2015 13:30:08 -0400
Josef Bacik <jbacik@fb.com> wrote:


> +static void merge_tasks(struct handle_data *h)
> +{
> +	struct trace_hash_item **bucket;
> +	struct trace_hash_item *item;
> +
> +	if (!merge_like_comms)
> +		return;
> +
> +	trace_hash_for_each_bucket(bucket, &h->task_hash) {
> +		trace_hash_for_each_item(item, bucket)
> +			add_group(h, task_from_item(item));
> +	}
> +}
> +
>  int trace_profile(void)
>  {
>  	struct handle_data *h;
>  
>  	for (h = handles; h; h = h->next) {
> +		if (merge_like_comms)
> +			merge_tasks(h);

I don't think we need the double check. Here you only call
merge_tasks() if merge_like_comms is set, but then the first thing you
do in merge_tasks() is to return if merge_like_comms is not set. One
check is enough.

-- Steve


>  		output_handle(h);
>  		trace_hash_free(&h->task_hash);
>  	}


      parent reply	other threads:[~2015-06-25  3:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 17:30 Josef Bacik
2015-06-25  3:07 ` Steven Rostedt
2015-06-25  3:31 ` Steven Rostedt
2015-06-25  3:39 ` Steven Rostedt [this message]

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=20150624233922.47b9ecbb@grimm.local.home \
    --to=rostedt@goodmis.org \
    --cc=jbacik@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.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
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

all inboxes | Powered by JetHome®