From 5804e5d5b96c4b2ba938529f97391e13dcc28ca9 Mon Sep 17 00:00:00 2001
From: kirky <1710267208@qq.com>
Date: Wed, 21 Jun 2023 04:06:10 -0400
Subject: [PATCH] curiser v1.1.0
---
software/utils/cruiser/README.md | 43 ++++++++++++++++++++++
software/utils/cruiser/config_template.ini | 37 +++++++++++++++++++
2 files changed, 80 insertions(+)
create mode 100644 software/utils/cruiser/README.md
create mode 100644 software/utils/cruiser/config_template.ini
diff --git a/software/utils/cruiser/README.md b/software/utils/cruiser/README.md
new file mode 100644
index 0000000..9667af4
--- /dev/null
+++ b/software/utils/cruiser/README.md
@@ -0,0 +1,43 @@
+# cruiser
+
+### 项目介绍
+Cruiser是一款自动化精度分析工具。能够针对所提供的源码进行半自动化差异源分析,定位到函数级差异源码。大幅降低精度分析难度。
+
+### 现行版本
+
+1.1.0
+
+### 二进制地址
+
+[cruiser.exe](https://gitee.com/kirky_x/kuneng-hpc-bin/tree/master/cruiser)
+
+### 使用说明
+
+Cruiser仅支持命令行方式进行使用,支持选项参数和配置文件两种配置输出方式进行使用。工具默认运行方式:参数选项方式。
+
+#### 参数选项方式
+
+```shell
+./cruiser.exe [options]
+```
+
+#### 配置文件方式
+
+```shell
+./cruiser.exe --config config.ini
+```
+
+### 选项支持
+
+| 选项 | 说明 | 默认值 |
+| ------------------ | ------------------------------------------------------------ | ------------------------------------- |
+| --config | 指定使用配置文件对工具进行配置初始化。此选项具有排他性,使用后其他选项均失效。 | - |
+| --root | 指定源码目录 | 默认程序运行路径 |
+| --log-arm | 指定arm平台运行所生成日志的路径 | 默认程序运行路径下名为‘arm.log’的文件 |
+| --log-x86 | 指定x86平台运行所生成日志的路径 | 默认程序运行路径下名为‘x86.log’的文件 |
+| --log | 指定cruiser日志输出的路径 | 默认程序运行路径下名为‘log’的文件夹 |
+| --log-mode | 指定日志输出的模式。支持:
**ALL(全量模式)**:将使用所有支持的模式
**STANDARD(标准输出模式)**:指定将工具的日志输出到标准输出上
**FILE(文本文件模式)**:指定将工具的日志以文本文件的形式输出到log指定的目录当中 | ALL(不区分大小写) |
+| --hook-granularity | 指定插桩的粒度。支持:
**ALL(全量模式)**:使用在MPI使能场景,将带进程号打印所有进程中插桩标记的变量的md5值
**MASTER(主进程模式)**:使用在MPI使能场景,将只打印主进程中插桩标记的变量的md5值
**SINGLE(单进程模式)**:使用在非MPI使能场景,将打印该执行进程中插桩标记的变量的md5值。注意:在MPI使能场景下,将不带ramk号打印所有标记的变量的md5值 | MASTER(不区分大小写) |
+| --main | 指定主函数模式下,主函数位置,以(文件路径,[类名.]函数名)的格式,支持多个指定 | - |
+| --help | 获取选项信息 | - |
+
diff --git a/software/utils/cruiser/config_template.ini b/software/utils/cruiser/config_template.ini
new file mode 100644
index 0000000..52599f3
--- /dev/null
+++ b/software/utils/cruiser/config_template.ini
@@ -0,0 +1,37 @@
+[INITIAL]
+# The root directory of the source code. By default, the program running directory is selected as the source code root directory
+dir_root =
+# The log file name output by the arm platform
+log_arm =
+# The log file name output by the x86 platform
+log_x86 =
+
+[LOGGER]
+# The log directory
+dir_log =
+# The log mode currently supports: ALL, STANDARD, FILE, CSV.
+# standard: Redirect log data to standard output
+# FILE: Redirect the log data to the log file
+# CSV: Redirect the log data to the csv file
+# Using all will apply all output modes
+mode = ALL
+
+[HOOK]
+# Hook mode. The hook mode currently supports: MAIN, LOG, and log mode is used by default
+# MAIN: Hook from the main function to all variables in the sub-function called by the lower level
+# LOG: Hook different variables according to the logs generated by different platforms
+mode = LOG
+# The process granularity of program log printing. Now supports: ALL, MASTER, SINGLE
+# ALL: For multi-process programs, print the output of all processes
+# MASTER: For multi-process programs, only the output of the main process (process 0) is printed
+# SINGLE: For single-process programs
+granularity = MASTER
+# The number of levels of downward recursive hooking sub-functions takes effect when HOOK.mode is main
+level = 3
+# The number of cutting for too long parameters during hook.
+split = 5
+# The regular expression of analyzing flag data in the log
+format_flag = {}-{}-call {}-{}-{}
+# Specify the main function entry of the program, which only takes effect when 'mode' is set to MAIN
+# format: (directory1, class.function), (directory2, function), ...
+# NOTE: No space characters in the path!!!
--
Gitee