From 648dc93187511710df47b4aca9080bca9a75089d Mon Sep 17 00:00:00 2001 From: Pratik Patel <pratikp@codeaurora.org> Date: Mon, 8 Dec 2014 11:53:41 -0800 Subject: [PATCH] linux-ramdump-parser-v2: fix tmc-etr sg parsing for blk == rwpval Address the corner case where we end up in a continuous (almost inifinite) loop when blk value equals rwpval. Change the condition from blk < rwpval to blk <= rwpval to fix this. Change-Id: I67923f3fa681e64eaff1821be7ae9805f66d47df --- linux-ramdump-parser-v2/qdss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 linux-ramdump-parser-v2/qdss.py diff --git a/linux-ramdump-parser-v2/qdss.py b/linux-ramdump-parser-v2/qdss.py old mode 100644 new mode 100755 index 1cfff70..97de37f --- a/linux-ramdump-parser-v2/qdss.py +++ b/linux-ramdump-parser-v2/qdss.py @@ -305,7 +305,7 @@ class QDSSDump(): start = blk continue elif (entry & 0x2) == 2: - if blk < rwpval and rwpval < (blk + 4096): + if blk <= rwpval and rwpval < (blk + 4096): if not bottom_delta_read: it = range(rwpval, blk + 4096) bottom_delta_read = True @@ -319,7 +319,7 @@ class QDSSDump(): continue start += 4 elif (entry & 0x1) == 1: - if blk < rwpval and rwpval < (blk + 4096): + if blk <= rwpval and rwpval < (blk + 4096): if not bottom_delta_read: it = range(rwpval, blk + 4096) bottom_delta_read = True -- GitLab