summaryrefslogtreecommitdiff
path: root/scripts/diffable
Commit message (Collapse)AuthorAgeFilesLines
* diffable: Allow input from external runtimeFrej Drejhammar2022-04-011-31/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `diffable` is used to evaluate the impact of a compiler optimization or checking that a compiler refactoring doesn't change the result in any significant way, the changes to the compiler source code produce many differences in the output from `diffable`. The sheer number of changes in line number directives in the output from, for example, a reformatting which inserts a line early in a module makes it hard to notice significant changes in the output. Prior to this patch `diffable` finds the source code to the applications it compiles by using `code:root_dir/0` and `code:lib_dir/1`, that is, it assumes that the source code to compile is the source for the running system. This patch adds a new command line flag to `diffable`. The flag, `--erltop <path>`, makes diffable look for the source code for the applications to compile in a different tree. The intended use case is as follows, you have a baseline and a development tree, located in directories $BASE and $DEV respectively: ``` $ PATH=$BASE/bin:$PATH $BASE/scripts/diffable --asm \ --deterministic /tmp/baseline ``` Now run `diffable` using the development compiler, but compile the source code from the baseline: ``` $ PATH=$DEV/bin:$PATH $DEV/scripts/diffable --erltop $BASE --asm \ --deterministic /tmp/dev ```
* Fix typos in scriptsKian-Meng Ang2022-01-091-1/+1
|
* diffable: Stop diffable --dis from crashing when the JIT is usedFrej Drejhammar2021-01-181-0/+2
| | | | | | | | | | When testing the JIT code generator it is useful to run it on a large number of functions. Running `diffable --dis` does just that, but as disassembly of loaded code is not supported by the JIT, diffable unfortunately crashes when trying to find labels in the empty output. This patch changes diffable:find_labels/3 to not crash on empty input, thus making diffable useful for exercising the JIT's code generator.
* otp: Remove HiPE and HiPE-related accessoriesJohn Högberg2020-11-091-4/+0
|
* diffable: Adapt rejoin_atoms/1 to change in disassemblerFrej Drejhammar2020-10-131-3/+3
| | | | | As of 389c0f3d87a6826a608eb532d4926d8cfd5d3d0d all operands are surrounded with '`':s, account for this change in rejoin_atoms/1.
* diffable: Fix bug in rejoin_atoms/1Frej Drejhammar2020-10-131-2/+4
| | | | | | | | | | | | The beam-assembly dump parser in diffable does not parse atoms containing spaces correctly, leading to, for example, the atom 'foo bar' to be considered to be two operands. Diffable compensates for this parser particularity, when important for the correct functioning of diffable, by using rejoin_atoms/1 to merge split atoms in the operand list. This patch fixes a bug in rejoin_atoms/1 where the attempted merging would stop as soon as a non-atom operand was found.
* erts: Implement the BeamAsm JITLukas Larsson2020-09-221-1/+0
| | | | | | Co-authored-by: John Högberg <john@erlang.org> Co-authored-by: Dan Gudmundsson <dgud@erlang.org> Co-authored-by: Björn Gustavsson <bjorn@erlang.org>
* diffable: Allow passing arbitrary compiler options to the compilerFrej Drejhammar2020-07-201-9/+13
| | | | | | | This patch removes the hard-coding of supported compiler options from diffable. Compiler options can now be given using the `--co <option>` flag. The implementation of the `--deterministic` flag has been implemented using the new framework.
* diffable: Refactor command line flags handlingFrej Drejhammar2020-07-201-17/+13
| | | | | | | Refactor command line parser to easily support flags with arguments, NFC. This change is preparing the parser for a future patch which will make it possible to pass arbitrary compiler options to compile:file/2 and compile:forms/2.
* diffable: Fix missing line breaks in usage messageFrej Drejhammar2020-07-201-2/+3
|
* scripts/diffable: Add option for compiling with +deterministicFrej Drejhammar2020-03-131-9/+15
| | | | | | | | | This patch adds a new `--deterministic` command line flag to the diffable script. When enabled, diffable compiles files with the `deterministic` compiler option enabled. As deterministic compilation results in line directives only containing the basename of module files, this greatly reduces the size of diffs when comparing the results from different build and source trees.
* diffable: Warn on files that take longer than 10s to compileJohn Högberg2020-03-051-33/+56
|
* scripts/diffable: Optionally compile the Elixir standard libraryBjörn Gustavsson2018-11-261-36/+96
| | | | | If Elixir is installed along the the Erlang/OTP repository, produce diff-friendly output for the Elixir standard library.
* scripts/diffable: Correct the number of modules being compiledBjörn Gustavsson2018-10-231-1/+1
|
* scripts/diffable: Use the diffable compiler optionBjörn Gustavsson2018-10-231-124/+29
| | | | | Now that the compiler has a `diffable` option, use it for a slight speed up.
* scripts/diffable: Refactor option parsingBjörn Gustavsson2018-10-231-10/+17
|
* diffable: Don't define VSN for the ssl appBjörn Gustavsson2018-07-061-3/+12
|
* scripts/diffable: Include the hipe applicationBjörn Gustavsson2018-05-041-0/+5
|
* Add scripts/diffableBjörn Gustavsson2018-04-111-0/+620
Run scripts/diffable without arguments to print a description and a few examples.