linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Yordan Karadzhov <ykaradzhov@vmware.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] kernel-shark-qt: Handle the case when the range of the model is too small
Date: Tue, 15 Jan 2019 10:05:30 -0500	[thread overview]
Message-ID: <20190115100530.13a5645f@gandalf.local.home> (raw)
In-Reply-To: <20190115101857.25857-1-ykaradzhov@vmware.com>

On Tue, 15 Jan 2019 12:18:57 +0200
Yordan Karadzhov <ykaradzhov@vmware.com> wrote:

> The size of the bin must be equal or greater than 1, hence the range
> must be equal or greater than the number of bins. When this condition
> is not satisfied, the range has to be extended, instead of just leaving
> the model unset.
> 
> Reported-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

You forgot to add:

Fixes: f97e31f00 ("kernel-shark-qt: Introduce the visualization model used by the Qt-based KS")

;-)

-- Steve

> Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
> ---
>  kernel-shark-qt/src/libkshark-model.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel-shark-qt/src/libkshark-model.c b/kernel-shark-qt/src/libkshark-model.c
> index 76e2940..2094795 100644
> --- a/kernel-shark-qt/src/libkshark-model.c
> +++ b/kernel-shark-qt/src/libkshark-model.c
> @@ -102,8 +102,10 @@ static void ksmodel_set_in_range_bining(struct kshark_trace_histo *histo,
>  	struct kshark_entry *last;
>  
>  	/* The size of the bin must be >= 1, hence the range must be >= n. */
> -	if (n == 0 || range < n)
> -		return;
> +	if (n == 0 || range < n) {
> +		range = n;
> +		max = min + n;
> +	}
>  
>  	/*
>  	 * If the number of bins changes, allocate memory for the descriptor of


      reply	other threads:[~2019-01-15 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-15 10:18 [PATCH] kernel-shark-qt: Handle the case when the range of the model is too small Yordan Karadzhov
2019-01-15 15:05 ` 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=20190115100530.13a5645f@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=ykaradzhov@vmware.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).