tools: Flush stdout explicitly in event loop
diff --git a/tools/hardirqs.py b/tools/hardirqs.py
index 239d813..3bcf649 100755
--- a/tools/hardirqs.py
+++ b/tools/hardirqs.py
@@ -19,6 +19,7 @@
 from bcc import BPF
 from time import sleep, strftime
 import argparse
+import sys
 
 # arguments
 examples = """examples:
@@ -248,6 +249,8 @@
             print("%-26s %11d" % (k.name.decode('utf-8', 'replace'), v.value / factor))
     dist.clear()
 
+    sys.stdout.flush()
+
     countdown -= 1
     if exiting or countdown == 0:
         exit()