On Wed, 14 Nov 2007, Josef Weidendorfer wrote:

> Can we solve this QUAL issue also via format string, e.g. via "...%{QUAL}...",
> such that %{QUAL} is replaced by Valgrind with $QUAL from the current
> environment?

Yes, Julian and I had come to the same conclusion.

> I thought a little bit about the problem with callgrind.
> IMHO I need multiple format strings for different scenarios, but
> the format strings could refer to substitution results of each other.
> E.g. it would be nice if the consistent output name specified with 
> "--out-file=..."
> could be refered in further arbitrary format strings as the tool requires, 
> e.g.
> as "...%o..." (for _o_utput file). Then, e.g. the default for "termination
> with separate counters per thread" would be "%o-%t".

I didn't really follow that, but it seems like Callgrind produces multiple 
output files.  They all have a common prefix, and then each one has a 
different suffix.  When it comes to processing them, presumably you give 
callgrind_annotate/KCachegrind the prefix, and then they can find all the 
extra files because they know what the suffixes look like.

In other words, it makes sense for a user to specify the prefix, but not the 
suffix, because the processing tools depend on them having a particular 
form.

If I'm right, then I think we only need:

   %p        process id
   %q{QUAL}  environment variable contents

%T for toolname isn't necessary, nor are %t or %c because they're not 
controllable by the user.

Overall, we'd have a --log-file option for normal Valgrind output (ie. what 
normally goes to stderr), and then for each tool that writes an output file 
(Cachegrind, Callgrind, Massif) there would be an option like --massif-file. 
In the Callgrind case it would be --callgrind-file-prefix.

Does this make sense?

Nick

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Valgrind-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to