Skip to content

Commit 6931806

Browse files
committed
llvm/utils/imisched.py: Hide pending queue by default
1 parent c43626e commit 6931806

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/utils/mischedutils/interactive_sched.py

+8
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def render(self) -> str:
4848

4949
class PickDetails(VerticalScroll):
5050
"""A widget explaining why the last SUnit was picked."""
51+
5152
info_str = reactive("", recompose=True)
5253

5354
def __init__(self) -> None:
@@ -65,6 +66,7 @@ class SUQueue(VerticalScroll):
6566
def __init__(self, queue_name: str) -> None:
6667
super().__init__(classes="queue")
6768
self.border_title = f"{queue_name} queue"
69+
self.display = queue_name == "Available"
6870

6971
def set_su_list(self, su_list: List[schedlogparser.ScheduleUnit]):
7072
"""Update the list of SUnits debing displayed."""
@@ -80,6 +82,7 @@ class RegionSchedScreen(Screen):
8082
("escape", "app.pop_screen", "Regions"),
8183
("n", "schedule_next", "Next"),
8284
("p", "unschedule_last", "Prev"),
85+
("q", "hide_pending", "Pending Queue"),
8386
]
8487
CSS = """
8588
CycleLine {
@@ -103,6 +106,7 @@ class RegionSchedScreen(Screen):
103106
layout: grid;
104107
grid-size: 2;
105108
grid-columns: 1fr 2fr;
109+
grid-rows: 3fr 2fr;
106110
min-height: 4;
107111
max-height: 12;
108112
height: 30%
@@ -163,6 +167,10 @@ def action_unschedule_last(self):
163167
self.cycles[action.picked_cycle].children[-1].remove()
164168
self.update_info_container()
165169

170+
def action_hide_pending(self):
171+
"""Toggle the pending queue container."""
172+
self.pending_queue.display = not self.pending_queue.display
173+
166174
def update_info_container(self):
167175
"""Update the various info widgets after scheduling/unscheduling a node."""
168176
if self.next_action_idx >= len(self.sched_region.sched_actions):

0 commit comments

Comments
 (0)