aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov <ykaradzhov@vmware.com>2019-02-21 14:42:05 +0200
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-02-22 14:35:22 -0500
commit9336dd6bcd381b50ebdc707c90d86e00ceb78d7a (patch)
treefe75e148c81654b43cc415a30913a335874910ab
parente9fc4f3265eead58e1935cc370e1708d43fb1b65 (diff)
downloadtrace-cmd-9336dd6bcd381b50ebdc707c90d86e00ceb78d7a.tar.gz
kernel-shark: Fix a bug in ksmodel_set_next_bin_edge()
The modification of the last bin of the model makes no sense (this is my mistake). The comment above the code that is doing this modification is partially correct, however it speaks about increasing the size of the last bin, while the code below the comment changes the lower edge of this bin. The actual increase of the size of the last bin is done in ksmodel_set_upper_edge() where the lower edge of the Upper Overflow bin gets shifted (max + 1). This effectively increases the size of the last bin. Link: http://lore.kernel.org/linux-trace-devel/20190221124205.21115-4-ykaradzhov@vmware.com Reported-by: Tzvetomir Stoyanov <tstoyanov@vmware.com> Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com> Fixes: f97e31f00 ("kernel-shark-qt: Introduce the visualization model ..") Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--kernel-shark/src/libkshark-model.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/kernel-shark/src/libkshark-model.c b/kernel-shark/src/libkshark-model.c
index b6d3612b..4bd1e2c4 100644
--- a/kernel-shark/src/libkshark-model.c
+++ b/kernel-shark/src/libkshark-model.c
@@ -267,15 +267,6 @@ static void ksmodel_set_next_bin_edge(struct kshark_trace_histo *histo,
time = histo->min + next_bin * histo->bin_size;
/*
- * The timestamp of the very last entry of the dataset can be exactly
- * equal to the value of the upper edge of the range. This is very
- * likely to happen when we use ksmodel_set_in_range_bining(). In this
- * case we have to increase the size of the very last bin in order to
- * make sure that the last entry of the dataset will fall into it.
- */
- if (next_bin == histo->n_bins - 1)
- ++time;
- /*
* Find the index of the first entry inside
* the next bin (timestamp > time).
*/