Exemple #1
0
def lockup_display(reverse_sort, show_tasks, options):
    rqlist = Tasks.getRunQueues()
    rqsorted = sorted(rqlist, key=getKey, reverse=reverse_sort)
    if (reverse_sort):
        now = rqsorted[0].Timestamp
    else:
        now = rqsorted[-1].Timestamp

    try:
        watchdog_thresh = readSymbol("watchdog_thresh")
    except:
        watchdog_thresh = -1

    for rq in rqsorted:
        prio = rq.curr.prio
        if (rq.curr.policy != 0):
            prio = rq.curr.rt_priority

        delayed_time = (now - rq.Timestamp) / 1000000000
        if watchdog_thresh > 0 and delayed_time >= watchdog_thresh:
            crashcolor.set_color(crashcolor.BLUE)

        print("CPU %3d: %10.2f sec behind by "
              "0x%x, %s [%s:%3d] (%d in queue)" %
              (rq.cpu, delayed_time, rq.curr, rq.curr.comm,
               get_task_policy_str(rq.curr.policy), prio, rq.nr_running))
        if (show_tasks):
            show_task_list(rq, reverse_sort, options)

        crashcolor.set_color(crashcolor.RESET)
Exemple #2
0
def do_searchstack(options):
    tt = Tasks.TaskTable()
    include_list = options.include.split(",")
    exclude_list = options.exclude.split(",")

    for t in tt.allThreads():
        stackdata = exec_crash_command("bt -f %d" % (t.pid))
        if search_one_task(stackdata, include_list, exclude_list) == True:
            print_bt_search(stackdata, include_list)
Exemple #3
0
def do_searchstack(options, bt_flag):
    tt = Tasks.TaskTable()
    include_list = options.include.split(",")
    exclude_list = options.exclude.split(",")

    for t in tt.allThreads():
        if options.task_name != "" and options.task_name not in t.comm:
            continue
        stackdata = exec_crash_command("bt -%s %d" % (bt_flag, t.pid))
        if search_one_task(stackdata, include_list, exclude_list) == True:
            if options.nodetails == True:
                print("%s" % exec_crash_command("bt %d" % (t.pid)))
            else:
                print_bt_search(stackdata, include_list)
Exemple #4
0
def lockup_display(reverse_sort, show_tasks, options):
    rqlist = Tasks.getRunQueues()
    rqsorted = sorted(rqlist, key=getKey, reverse=reverse_sort)
    if (reverse_sort):
        now = rqsorted[0].Timestamp
    else:
        now = rqsorted[-1].Timestamp

    for rq in rqsorted:
        prio = rq.curr.prio
        if (rq.curr.policy != 0):
            prio = rq.curr.rt_priority

        print("CPU %3d: %10.2f sec behind by "
              "0x%x, %s [%s:%3d] (%d in queue)" %
              (rq.cpu,
               (now - rq.Timestamp) / 1000000000, rq.curr, rq.curr.comm,
               get_task_policy_str(rq.curr.policy), prio, rq.nr_running))
        if (show_tasks):
            show_task_list(rq, reverse_sort, options)
Exemple #5
0
def show_rt_stat(options):
    rqlist = Tasks.getRunQueues()
    for rq in rqlist:
        show_rt_stat_in_rq(rq)