Commit Graph

7 Commits

Author SHA1 Message Date
Michael Gottesman
31b8c29355 [dev-scripts] Add a new tool called scurve_printer to print scurve data produced by csvcolumn_to_scurve.
This used matplotlib internally to plot the values. Now one can produce scurves
without leaving the command line.

I tried to get logarithmic scale to work, but I was unable to do so in a trivial
way. That is something for a different hacking session. I need to move on.
2018-07-06 16:44:34 -07:00
Michael Gottesman
70b58fa88d [dev-scripts] Add csv_to_scurve.py to convert csv documents into an scurve csv file ready for graphing.
I am upstreaming this for two reasons:

1. Traditionally I have done this by hand in a spreadsheet program. I would
rather just have a program fix it up for me.
2. Multiple people have asked me about how to produce this sort of graph and I
would just like to document it via a script.

I hope it is useful to others. You use the script by invoking it as:

./csvcolumn_to_scurve <input_file> <before_column> <after_column> [output_file]
2018-07-06 16:31:40 -07:00
Michael Gottesman
157aebc639 [dev-script] Add a new script called at-to-filelist.
This script in combination with <(...) can be used to speed up creating
reproductions from command lines that use '@' files to define their inputs.

An example use case:

Consider a swiftc command line that uses the @ symbol.

  swiftc @/foo/bar/baz.txt

When this is run, the @ command is expanded into a filelist in a temporary
file. This doesn't work with -### since -### outputs the command line with a
temporary file for the filelist, but uses a path to a temporary file that
doesn't exist, e.g.:

  swift -frontend -filelist /tmp/tmp.filelist ...

To run this command, you use the at-to-filelist command as follows:

  swift -frontend -filelist <(at-to-filelist /foo/bar/baz.txt)
2018-02-10 22:43:36 -08:00
Michael Gottesman
2a6e1b32ac [dev-scripts] Add a tool called emacs-compile that runs $@ in an emacs compile session.
Something useful that I use all the time that I would like to give to others. It
enables emacs compile-mode to be used like a standalone-ish application instead
of one application with many modes, one of which is compile-mode.
2018-02-07 12:37:02 -08:00
Erik Eckstein
a7c7d63a9b Add a utility script to split a disassembled function from lldb into basic blocks.
Useful to show the control flow graph of a disassembled function.
The control flow graph can the be viewed with the viewcfg utility:

(lldb) disassemble
   <copy-paste output to file.s>
$ blockifyasm < file.s | viewcfg
2018-02-02 15:30:48 -08:00
Erik Eckstein
4262a12dc8 split-cmdline: Correctly handle spaces in arguments.
Also add an example in the script header.
2017-11-13 12:47:30 -08:00
Erik Eckstein
47e5a0757a A utility script to split long swift compiler command lines.
For details see the comment in split-cmdline

I put this under a new directory utils/dev-script because we have so much stuff in utils already.
Other, similar scripts can then be added in dev-scripts as well.
2017-10-29 15:27:32 -07:00