-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements and fixes #1
base: gottagofast
Are you sure you want to change the base?
Conversation
@@ -151,12 +163,14 @@ def main(): | |||
p.add_argument("--timeout", default=10, type=int, help="Timeout to complete a test run, exceeding the timeout marks the test as failed.") | |||
p.add_argument("-j", "--threads", type=int, help="Number of parallel threads to start. Assume CPU core count if no value is provided.") | |||
p.add_argument("--jit", choices=["tcc", "gcc", "llvm"], default="tcc", help="Which ETISS JIT compiler to use.") | |||
p.add_argument("--keep-output", choices=[x.name.lower() for x in KeepLogType], default=KeepLogType.NONE.name.lower(), help="Save ETISS stdout/stderr to files") | |||
p.add_argument("--trace", action="store_true", help="Generate an instruction trace. Helpful for debugging.") | |||
p.add_argument("--keep-output", choices=[x.name.lower() for x in KeepLogType] + ["both"], default=KeepLogType.NONE.name.lower(), help="Save ETISS stdout/stderr to files") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest implementing this iteration with the __members__
property of enums.Flag
: https://docs.python.org/3/library/enum.html#enum.EnumType.__members__
from functools import partial | ||
|
||
from elftools.elf.elffile import ELFFile | ||
from elftools.elf.sections import SymbolTableSection | ||
from tqdm.contrib.concurrent import process_map | ||
|
||
|
||
class KeepLogType(Flag): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change to IntFlag
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though pt that it would be more convenient, as it also allows x & KeepLogType.STDERR
if x is and int, but since we convert the arguments to KeepLogType
anyways it has no real benefit.
@@ -100,6 +108,8 @@ def run_test(test_args: "tuple[pathlib.Path, str, pathlib.Path]", args): | |||
test_addrs[symbol.entry["st_value"]] = symbol.name | |||
|
|||
fname = (results_path / "config" / test_file.stem).with_suffix(".ini") | |||
if args.debug_jit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say this is not a problem to be solved here, LLVMJIT is rarely used anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can drop the assertion warning, but we need a way to disable the jit_debug because otherwise it wouldn’t be possible to run the tests against the LLVMJIT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does LLVMJIT complain when this option is set? from what I see here https://github.com/tum-ei-eda/etiss/blob/b24bc484d1498d6cdc4587a4dbd246adce0e5f26/JITImpl/LLVM/src/LLVMJIT.cpp#L219 debug should be supported just fine...
If ETISS timeouts running tests, from experience the cause is an error handler implemented as loop to self. If tests are known to do that (i.e. rvXXsi-p-dirty), |
Summary:
Flag/IntFlag
iterators changed. AsBOTH = 3
is an alias forSTDOUT | STDERR
, it will not be included in iterators. Hence we need to add the"both"
choice manually to argparse.--trace {instr,mem,both}
flag--debug-jit
flag (Disable by default as LLVM JIT does not support-g
?)