fixing SQTT copy mode result buffer allocation

[ROCm/rocprofiler commit: 58e879343f]
这个提交包含在:
Evgeny 于 2018-01-23 18:57:45 -06:00 提交
1 父节点 f92f655139
当前提交 14e45e9cb4
4 个文件已更改
+18 -18

没有与搜索条件相匹配的文件

+2 -2
查看文件
@@ -184,13 +184,13 @@ void output_results(FILE* file, const rocprofiler_feature_t* features, const uns
ptr = chunk_data + off;
size += chunk_size;
}
free(p->data.result_bytes.ptr);
fprintf(file, "size(%lu)\n", size);
if (size > p->data.result_bytes.size) {
fprintf(stderr, "SQTT data size is out of the result buffer size\n");
exit(1);
}
free(p->data.result_bytes.ptr);
const_cast<rocprofiler_feature_t*>(p)->data.result_bytes.size = 0;
} else {
fprintf(file, "(\n");
trace_data_arg_t trace_data_arg{file, label};