[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: Devel::DProf patch to allow setting output file



On Wed, 05 Jan 2000 14:39:56 EST, Ilya Zakharevich wrote:
>Gurusamy Sarathy writes:
>> @@ -663,10 +665,14 @@
>>  	    else {
>>  		g_dprof_ticks = HZ;
>>  	    }
>> +
>> +	    buffer = getenv("PERL_DPROF_OUT_FILE_NAME");
>> +	    g_out_file_name = savepv(buffer ? buffer : "tmon.out");
>>  	}
>>  
>> -        if ((g_fp = PerlIO_open("tmon.out", "w")) == NULL)
>> -	    croak("DProf: unable to write tmon.out, errno = %d\n", errno);
>> +        if ((g_fp = PerlIO_open(g_out_file_name, "w")) == NULL)
>> +	    croak("DProf: unable to write '%s', errno = %d\n",
>> +		  g_out_file_name, errno);
>
>Why savepv?

It should be possible to do without if we don't want to keep the filename.
(I was expecting addition of diagnostics etc., in future that will need
to get at the file name.)


Sarathy
gsar@ActiveState.com


References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]