syscalls/__init__: log which syscall is made
authorJacob Lifshay <programmerjake@gmail.com>
Sun, 3 Dec 2023 08:42:51 +0000 (00:42 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Mon, 4 Dec 2023 06:32:30 +0000 (22:32 -0800)
this is very handy when looking at logs, since you no longer have to
manually translate syscall numbers to syscall names.

src/openpower/syscalls/__init__.py

index 88006fab89de425b0b3614d7d6555de6bfa4e858..1277d19d231da96141ce0b3cde2b1e0a1b0dd2ce 100644 (file)
@@ -3,7 +3,7 @@ import errno
 import inspect
 import json
 import pathlib
-
+from openpower.util import log, LogType
 
 
 def architecture(arch, bits=0):
@@ -189,6 +189,9 @@ class Dispatcher:
         identifier = str(identifier)
         entry = self.__guest[identifier][1][0]
 
+        log("syscalls.Dispatcher[%s] (%s)" % (identifier, entry),
+            kind=LogType.InstrInOuts)
+
         return getattr(self, entry)
 
     def __getattr__(self, entry):