| 4.0 |
| 4.1 |
| 4.2 |
+| 5.0 |
Protocol version should be chosen the same as one on the target where the trace was gathered. For detailed information and protocol description, please refer to Protocol Description located at *swap-manager/docs/protocol.rst* or at **swap-manager** *README* file.
-If user hasn't specified any protocol version, ***4.2*** protocol version will be used as default.
+If user hasn't specified any protocol version, ***5.0*** protocol version will be used as default.
### Output types
**Trace Parser** supports the following output types:
This command will read *trace.bin*, parse it into text format and output to *trace.txt*.
The same command, if target info data is specified manually:
``` bash
-./swap_parser -i trace.bin -o trace.txt -c 4 -d 5 -v 4.2 -a api_map_list -t text
+./swap_parser -i trace.bin -o trace.txt -c 4 -d 5 -v 5.0 -a api_map_list -t text
```
If user wants to use default data, it will be like the following:
``` bash
("output,o", po::value<std::string>(), "Output file")
("cpu_num,c", po::value<int>()->default_value(4), "Target CPUs number")
("devs_num,e", po::value<int>()->default_value(5), "Target energy devices number")
- ("version,v", po::value<std::string>()->default_value("4.2"),
+ ("version,v", po::value<std::string>()->default_value("5.0"),
"Protocol version")
("type,t", po::value<std::string>()->required(),
"Output type(t(ext), p(y), j(son), c(sv))")
const std::string v40 = "4.0";
const std::string v41 = "4.1";
const std::string v42 = "4.2";
+ const std::string v50 = "5.0";
const int cpu_num = init_data.cpu_num;
const int devs_num = init_data.devs_num;
std::shared_ptr<DataWriter> dw = init_data.writer;
protocol_ = std::make_unique<Protocol41>(dw, cpu_num, devs_num, std::move(api_map));
else if (!init_data.version.compare(v42))
protocol_ = std::make_unique<Protocol42>(dw, cpu_num, devs_num, std::move(api_map));
+ else if (!init_data.version.compare(v50))
+ // Only the LSan report has been changed, the message format has not been changed
+ protocol_ = std::make_unique<Protocol42>(dw, cpu_num, devs_num, std::move(api_map));
else
throw std::logic_error((boost::format("Wrong protocol version <%1%>. \
Suppotred versions are <%2%>, \
- <%3%>, <%4%>, <%5%>")
+ <%3%>, <%4%>, <%5%>, <%6%>")
% init_data.version % v30 % v40 % v41 %
- v42).str());
+ v42 % v50).str());
}
void Parser::start_file() const