adding begin_ts_file.txt for app start time
Change-Id: I976e7bf06eeafa76c80cc847c341dde9f1f5895e
[ROCm/roctracer commit: c9a7d6c4a8]
Este commit está contenido en:
@@ -97,6 +97,7 @@ LOADER_INSTANTIATE();
|
||||
TRACE_BUFFER_INSTANTIATE();
|
||||
|
||||
// Global output file handle
|
||||
FILE* begin_ts_file_handle = NULL;
|
||||
FILE* roctx_file_handle = NULL;
|
||||
FILE* hsa_api_file_handle = NULL;
|
||||
FILE* hsa_async_copy_file_handle = NULL;
|
||||
@@ -107,6 +108,7 @@ FILE* pc_sample_file_handle = NULL;
|
||||
|
||||
void close_output_file(FILE* file_handle);
|
||||
void close_file_handles() {
|
||||
if (begin_ts_file_handle) close_output_file(pc_sample_file_handle);
|
||||
if (roctx_file_handle) close_output_file(roctx_file_handle);
|
||||
if (hsa_api_file_handle) close_output_file(hsa_api_file_handle);
|
||||
if (hsa_async_copy_file_handle) close_output_file(hsa_async_copy_file_handle);
|
||||
@@ -920,6 +922,11 @@ extern "C" PUBLIC_API bool OnLoad(HsaApiTable* table, uint64_t runtime_version,
|
||||
|
||||
const char* output_prefix = getenv("ROCP_OUTPUT_DIR");
|
||||
|
||||
// App begin timestamp begin_ts_file.txt
|
||||
begin_ts_file_handle = open_output_file(output_prefix, "begin_ts_file.txt");
|
||||
const timestamp_t app_start_time = timer->timestamp_fn_ns();
|
||||
fprintf(begin_ts_file_handle, "%lu\n", app_start_time);
|
||||
|
||||
// Enable HSA API callbacks/activity
|
||||
if (trace_hsa_api) {
|
||||
hsa_api_file_handle = open_output_file(output_prefix, "hsa_api_trace.txt");
|
||||
|
||||
Referencia en una nueva incidencia
Block a user