[Pdbg] [PATCH v2] htm: Fixed '-l' option to work as intended with new probing

Rashmica Gupta rashmica.g at gmail.com
Mon Jun 17 11:37:25 AEST 2019


This option was initially added for htm core tracing where we want the
core that the specified thread belongs to to be selected. The behaviour
was changed to only select the thread when the new probing was added.
Let's change the behaviour back, and select the pib, core and thread.

Signed-off-by: Rashmica Gupta <rashmica.g at gmail.com>
Acked-by: Michael Neuling <mikey at neuling.org>
---
v2: Amitay pointed out that we should select the thread as well as the
core, as there may be users other than htm which expect the thread to be
selected.


 src/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.c b/src/main.c
index d5f9385..60606d0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -517,6 +517,10 @@ static bool parse_options(int argc, char *argv[])
 
 				pir_map(pir, &chip, &core, &thread);
 
+				if (!pathsel_add("pib%d", chip))
+					return false;
+				if (!pathsel_add("pib%d/core%d", chip, core))
+					return false;
 				if (!pathsel_add("pib%d/core%d/thread%d", chip, core, thread))
 					return false;
 			}
-- 
2.17.2



More information about the Pdbg mailing list