[sysprof/wip/visualizers] line-visualizer-row: disable time optimization
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/visualizers] line-visualizer-row: disable time optimization
- Date: Fri, 30 Sep 2016 21:03:46 +0000 (UTC)
commit a20ba80f3debeb7f724552e696a0e648e63782d4
Author: Christian Hergert <chergert redhat com>
Date: Fri Sep 30 14:02:58 2016 -0700
line-visualizer-row: disable time optimization
This is overactive because we could be zoomed in so far that we
don't pick up the adjacent frame. We need something more clever
that can pick up frames adjacent to the visible area of the
capture.
lib/sp-line-visualizer-row.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/lib/sp-line-visualizer-row.c b/lib/sp-line-visualizer-row.c
index ae9f2a6..af79175 100644
--- a/lib/sp-line-visualizer-row.c
+++ b/lib/sp-line-visualizer-row.c
@@ -745,10 +745,7 @@ sp_line_visualizer_row_load_data_worker (GTask *task,
{
LoadData *load = task_data;
g_autoptr(GArray) counter_ids = NULL;
- SpCaptureCondition *left, *right;
- gint64 ext_begin_time;
- gint64 ext_end_time;
- gint64 ext;
+ SpCaptureCondition *left;
g_assert (G_IS_TASK (task));
g_assert (SP_IS_LINE_VISUALIZER_ROW (source_object));
@@ -763,19 +760,29 @@ sp_line_visualizer_row_load_data_worker (GTask *task,
g_array_append_val (counter_ids, line_info->id);
}
+#if 0
/*
* Add a little extra time to the visible range so that we can get any datapoints
* that might be overlapping the region a bit. This helps so that we can draw
* appropriate data points that need a proper x,y coordinate outside the
* visible area for cairo_curve_to().
+ *
+ * XXX: This is currently disabled because at certain zoom levels, you will end
+ * up missing data points. We need to always include one datapoint before the
+ * current time range.
*/
+ SpCaptureCondition *right;
+ gint64 ext_begin_time;
+ gint64 ext_end_time;
+ gint64 ext;
ext = (load->end_time - load->begin_time) / 3;
ext_begin_time = load->begin_time - ext;
ext_end_time = load->end_time + ext;
+ right = sp_capture_condition_new_where_time_between (ext_begin_time, ext_end_time);
+#endif
left = sp_capture_condition_new_where_counter_in (counter_ids->len, (guint *)(gpointer)counter_ids->data);
- right = sp_capture_condition_new_where_time_between (ext_begin_time, ext_end_time);
- sp_capture_cursor_add_condition (load->cursor, sp_capture_condition_new_and (left, right));
+ sp_capture_cursor_add_condition (load->cursor, left);
sp_capture_cursor_foreach (load->cursor, sp_line_visualizer_row_load_data_frame_cb, load);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]