diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-05-02 16:28:00 +1000 |
---|---|---|
committer | Alistair Popple <alistair@popple.id.au> | 2018-05-08 11:45:28 +1000 |
commit | ebba1d4e129f359b1bb8bcdec1c94f202d388b7a (patch) | |
tree | 0a8aeb7480da7ff2a312e265c255e8bc5aff24d2 /src/htm.c | |
parent | 15747dd503c063a1836bfb6b6964216df9f24dfb (diff) | |
download | pdbg-ebba1d4e129f359b1bb8bcdec1c94f202d388b7a.tar.gz pdbg-ebba1d4e129f359b1bb8bcdec1c94f202d388b7a.zip |
libpdbg/p9chip.c: query thread active and stop states
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'src/htm.c')
-rw-r--r-- | src/htm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -322,6 +322,8 @@ int run_htm(int optind, int argc, char *argv[]) * This is as easy as checking that every single * thread is "ACTIVE" and hasn't gone into any sleep * state. + * + * On P9 it requires checking for THREAD_STATUS_STOP */ pdbg_for_each_class_target("thread", target) { pdbg_target_probe(target); @@ -329,7 +331,8 @@ int run_htm(int optind, int argc, char *argv[]) if (pdbg_target_status(target) == PDBG_TARGET_NONEXISTENT) continue; - if ((thread_status(target) & THREAD_STATUS_ACTIVE) != THREAD_STATUS_ACTIVE) { + if ((!(thread_status(target) & THREAD_STATUS_ACTIVE)) || + (thread_status(target) & THREAD_STATUS_STOP)) { fprintf(stderr, "It appears powersave is on 0x%" PRIx64 "%p\n", thread_status(target), target); fprintf(stderr, "core HTM needs to run with powersave off\n"); fprintf(stderr, "Hint: put powersave=off on the kernel commandline\n"); |