[vte] [ring] Add debug output
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] [ring] Add debug output
- Date: Tue, 8 Sep 2009 06:42:22 +0000 (UTC)
commit 3ea50a543462262407a54b7e0860c5121c96655e
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue Sep 8 01:03:42 2009 -0400
[ring] Add debug output
src/ring.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index d1b133d..94d9e05 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -344,6 +344,9 @@ _vte_row_storage_compact (VteRowStorage storage, char *out, const VteCell *cells
{
guint32 basic_attrs = basic_cell.i.attr;
+ _vte_debug_print(VTE_DEBUG_RING, "Compacting row: %d %d %d.\n",
+ storage.flags.compact, storage.flags.charbytes, storage.flags.attrbytes);
+
if (!storage.compact) {
memcpy (out, cells, len * sizeof (VteCell));
return;
@@ -358,6 +361,9 @@ _vte_row_storage_uncompact (VteRowStorage storage, const char *from, VteCell *ce
{
guint32 basic_attrs = basic_cell.i.attr;
+ _vte_debug_print(VTE_DEBUG_RING, "Uncompacting row: %d %d %d.\n",
+ storage.flags.compact, storage.flags.charbytes, storage.flags.attrbytes);
+
if (!storage.compact) {
memcpy (cells, from, len * sizeof (VteCell));
return;
@@ -809,6 +815,8 @@ _vte_ring_index (VteRing *ring, guint position)
VteRingChunkCompact *chunk = (VteRingChunkCompact *) _vte_ring_find_chunk (ring, position);
VteRowData *compact_row = _vte_ring_chunk_compact_index (chunk, position);
+ _vte_debug_print(VTE_DEBUG_RING, "Caching row %d.\n", position);
+
_vte_row_data_uncompact_row (&ring->cached_row, compact_row);
ring->cached_row_num = position;
}
@@ -924,6 +932,8 @@ _vte_ring_ensure_writable (VteRing *ring, guint position)
if (G_LIKELY (position >= ring->head->start))
return;
+ _vte_debug_print(VTE_DEBUG_RING, "Ensure writable %d.\n", position);
+
while (position < ring->head->start)
_vte_ring_uncompact_one_row (ring);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]