add set_program_name implementation
This commit is contained in:
parent
cc9a7ece7a
commit
60ce804e36
|
@ -72,4 +72,17 @@ void rvprof_init(const char* output_file){
|
|||
|
||||
// register atexit handler to automate cleanup
|
||||
register_atexit_handler();
|
||||
}
|
||||
}
|
||||
|
||||
void rvprof_set_program_name(const char* program_name){
|
||||
if (g_rvprof.config.program_name){
|
||||
rvprof_free(g_rvprof.config.program_name, strlen(g_rvprof.config.program_name)+1);
|
||||
}
|
||||
if (program_name) {
|
||||
g_rvprof.config.program_name = rvprof_malloc(strlen(program_name)+1);
|
||||
if (g_rvprof.config.program_name) {
|
||||
strcpy(g_rvprof.config.program_name, program_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue