-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
In the current reference implementation, the trace file is opened and closed upon every event logging operation. This means that for each task handled, the process performs a file open, a write operation, and a file close.
void log_func_call(uint8_t log_level, const char* function_name, const char* message_format, ...)
{
...
pLogFile = fopen(g_ref_collector_logger.file_name, "a");
if (!pLogFile)
{
printf("ERROR: Cannot open file: %s\n", g_ref_collector_logger.file_name);
return;
}
fprintf(pLogFile, "%s\n", log_buffer);
fclose(pLogFile);
...
}
This approach creates significant overhead. A more efficient method would be to open the trace file a single time during the initialization phase and close it gracefully during finalization. This would improve performance by reducing redundant I/O operations.
BTW, looks like need to update reference collector inside vtune profiler releases.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request