|
From: <sv...@va...> - 2014-08-20 20:37:42
|
Author: florian
Date: Wed Aug 20 20:37:33 2014
New Revision: 14321
Log:
Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory).
Looks like these were leftovers from early days -- perhaps r7235.
Modified:
trunk/callgrind/dump.c
trunk/callgrind/global.h
Modified: trunk/callgrind/dump.c
==============================================================================
--- trunk/callgrind/dump.c (original)
+++ trunk/callgrind/dump.c Wed Aug 20 20:37:33 2014
@@ -37,7 +37,6 @@
static Int out_counter = 0;
static HChar* out_file = 0;
-static HChar* out_directory = 0;
static Bool dumps_initialized = False;
/* Command */
@@ -62,18 +61,6 @@
return out_counter;
}
-HChar* CLG_(get_out_file)()
-{
- CLG_(init_dumps)();
- return out_file;
-}
-
-HChar* CLG_(get_out_directory)()
-{
- CLG_(init_dumps)();
- return out_directory;
-}
-
/*------------------------------------------------------------*/
/*--- Output file related stuff ---*/
/*------------------------------------------------------------*/
@@ -1654,7 +1641,7 @@
}
/*
- * Set up file names for dump output: <out_directory>, <out_file>.
+ * Set up file names for dump output: <out_file>.
* <out_file> is derived from the output format string, which defaults
* to "callgrind.out.%p", where %p is replaced with the PID.
* For the final file name, on intermediate dumps a counter is appended,
@@ -1669,7 +1656,6 @@
*/
void CLG_(init_dumps)()
{
- Int lastSlash, i;
SysRes res;
static int thisPID = 0;
@@ -1687,7 +1673,6 @@
/* If a file name was already set, clean up before */
if (out_file) {
VG_(free)(out_file);
- VG_(free)(out_directory);
VG_(free)(filename);
out_counter = 0;
}
@@ -1696,19 +1681,6 @@
out_file =
VG_(expand_file_name)("--callgrind-out-file", CLG_(clo).out_format);
- /* get base directory for dump/command/result files */
- CLG_ASSERT(out_file[0] == '/');
- lastSlash = 0;
- i = 1;
- while(out_file[i]) {
- if (out_file[i] == '/') lastSlash = i;
- i++;
- }
- i = lastSlash;
- out_directory = (HChar*) CLG_MALLOC("cl.dump.init_dumps.1", i+1);
- VG_(strncpy)(out_directory, out_file, i);
- out_directory[i] = 0;
-
/* allocate space big enough for final filenames */
filename = (HChar*) CLG_MALLOC("cl.dump.init_dumps.2",
VG_(strlen)(out_file)+32);
Modified: trunk/callgrind/global.h
==============================================================================
--- trunk/callgrind/global.h (original)
+++ trunk/callgrind/global.h Wed Aug 20 20:37:33 2014
@@ -796,8 +796,6 @@
/* from dump.c */
void CLG_(init_dumps)(void);
-HChar* CLG_(get_out_file)(void);
-HChar* CLG_(get_out_directory)(void);
/*------------------------------------------------------------*/
/*--- Exported global variables ---*/
|
|
From: Josef W. <Jos...@gm...> - 2014-08-22 08:56:14
|
Am 20.08.2014 um 22:37 schrieb sv...@va...: > Author: florian > Date: Wed Aug 20 20:37:33 2014 > New Revision: 14321 > > Log: > Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory). > Looks like these were leftovers from early days -- perhaps r7235. Actually from r12268, when the mechanism for interactive control of Callgrind runs changed from using a command file to vgdb. Thanks! How did you find out these left-overs? Josef |
|
From: Florian K. <fl...@ei...> - 2014-08-22 14:35:09
|
On 22.08.2014 10:56, Josef Weidendorfer wrote:
>> Log:
>> Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory).
>> Looks like these were leftovers from early days -- perhaps r7235.
>
> Actually from r12268, when the mechanism for interactive control of
> Callgrind runs
> changed from using a command file to vgdb.
>
> Thanks! How did you find out these left-overs?
>
It was a by-product of my quest hunting down fixed size buffers. When I
ran across those prototypes I wondered how you would piece together the
full path name and whether you would use a fixed size buffer when doing
so. That got me searching.
Florian
|