Re: [BUG] double-use of short option "-s" in textDump module
Mathieu Desnoyers <[email protected]>
| Newsgroups | gmane.linux.kernel.tracing |
|---|---|
| Message-ID | <20061217013318.GA29368@Krystal> |
Hi Tim, Yes, I guess it would be better to change this option. However, note must be taken of a detail : those two "-s" options are in different modules. The --process_state "-s" option is in textDump.c, while the --stats '-s' is in batchAnalysis.c. batchAnalysis is loaded as a dependency of textDump. The effective options use the last loaded option. For instance, if we explicitely load batchAnalysis : ./lttv -m batchAnalysis -m textdump -s will use textDump's -s ./lttv -m batchAnalysis -s -m textdump will use batchAnalysis' -s At some point, we won't be able to completely eliminate those command line argument shortcuts collisions, so it is good to know how to use them when it happens. What about '-r' for --process_state ? Mathieu * Tim Bird ([email protected]) wrote: > Executive summary: > '-s' short option is used for two different flags for > the textDump command arguments, causing confusion and > much consternation for Tim. > > Long story: > I can't believe it bit me again! I reported having problems > with using the textDump module to output stats in August, > and Robert Wisniewski helped me out by telling me to use the > "--stats" option. Back then, I never did figure out why > using the "-s" option didn't have the desired effect. > > I've been working on other stuff, and got back to working > with lttv. (an older version (0.8.46), sorry), and I tried to > use the "-s" option to get stats again. For the life of > me I couldn't figure out why I was successfully getting > stats in the gui but not from textDump. > > In a forehead-slapping moment, I discovered this sequence > in the textDump online help: > > ... > > --stats -s argument: > > write the traceset and trace statistics > > --output -o argument: file name > > output file where the text is written > > --field_names -l argument: > > write the field names for each event > > --process_state -s argument: > > write the pid and state for each event > > It looks like textDump uses the short option '-s' for > BOTH --stats and --process_state. Upon more careful review > of my output, I was, indeed, getting the process_state > in my event output. I missed it because I kept looking > at the stats stuff and not the event lines. > > Has this been fixed in a more recent LTTV? Can we change > one of these short options to something else to avoid this > confusion in the future? I'll be happy to submit a patch > if someone will express a preference for the option letter. > > Thanks, > -- Tim > > ============================= > Tim Bird > Architecture Group Chair, CE Linux Forum > Senior Staff Engineer, Sony Electronics > ============================= > > _______________________________________________ > Ltt-dev mailing list > [email protected] > http://listserv.shafik.org/mailman/listinfo/ltt-dev > OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68