Execute test analyses, generate results, and save them in specific directory.
- Help
- Config file
- Output directory
- Tests directory
- Timeout
- Path to Compiler
- Compiler Arguments
- Profiler
- Path to gem5 Home
- Path to gem5 Binary
- Target ISA
- Path to simulation script
- Log level
Use the help option to see all available options:
python3 cha.py analyze --helpSpecify the path to the configuration file. By default, there is no configuration file specified.
Note: Configuration file is a JSON file that contains all the necessary parameters for the analysis.
# Use a specific configuration file
python3 cha.py analyze --config-file "path/to/config_file"Specify a custom directory to save the analysis results. By default, results will be saved in the chapy-analyze directory. Specified directory will contain analysis results in the form of .data file.
Note: If the specified directory does not exist, it will be created. And, if the directory is not empty, the existing files will be removed, and overwritten with the new analysis results.
# Save analysis results in "outputDir" directory
python3 cha.py analyze --out-dir "outputDir"Specify the path to the directory containing the tests. By default, tests are expected in the chapy-tests directory. Directory should contain one or more test files written in C language.
# Use tests from "testsDir" directory
python3 cha.py analyze --test-dir "testsDir"Set the number of seconds after which the test will be stopped. The default is 10 seconds.
# Set timeout to 30 seconds
python3 cha.py analyze --timeout 30Specify the path to the compiler. The default compiler is gcc.
# Use a custom compiler
python3 cha.py analyze --compiler "path/to/compiler"Pass additional arguments to the compiler. By default, no arguments are passed.
# Pass arguments to the compiler
python3 cha.py analyze --compiler-args "-O2 -Wall"Specify the type of profiler to use. The default is perf.
# Use a different profiler
python3 cha.py analyze --profiler otherProfilerSpecify the path to the gem5 home directory. By default, the gem5 home directory is ./thirdparty/gem5/.
# Set gem5 home directory
python3 cha.py analyze --gem5-home "path/to/gem5_home"Specify the path to the gem5 binary. By default, the gem5 binary path is ./.
# Set gem5 binary path
python3 cha.py analyze --gem5-bin "path/to/gem5_bin"Specify the type of architecture being simulated. By default, the target ISA is not specified.
# Set target ISA
python3 cha.py analyze --target-isa "x86"Specify the path to the simulation script. By default, the simulation script path is root directory ./.
# Set simulation script path
python3 cha.py analyze --sim-script "path/to/sim_script"Control the verbosity of log messages by setting the log level. The default level is WARNING. Choose from the following options:
DEBUG: Shows detailed information, typically useful for diagnosing problems. Use this level for development and debugging purposesINFO: Provides confirmation that things are working as expected. This level is generally used to inform users about the progress and state of the applicationWARNING: Indicates that something unexpected happened, or a potential problem is detected, but the application is still running as expected. This level helps to highlight issues that might need attention in the futureERROR: Signifies that a serious problem has occurred, and the application has not been able to perform some function. This level is used to indicate errors that prevent the program from continuing some operationCRITICAL: Represents a very serious error, indicating that the program itself may be unable to continue running. This level is used for critical issues that require immediate attention
Pass the desired log level using the --log-level option. For example, to set the log level to INFO:
python3 cha.py analyze --log-level INFO