Commit Graph

2 Commits

Author SHA1 Message Date
Vyacheslav Egorov f8f5365a94 [vm/compiler] Fix sorting of instructions stats.
If you are sorting array of T* with qsort
your comparator is getting T** values.

TBR=kustermann@google.com

Change-Id: I159b4ba5c7757c9f585de60165e0eb63576d873a
Reviewed-on: https://dart-review.googlesource.com/51260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-15 12:54:25 +00:00
Vyacheslav Egorov 0b83be906c [vm/compiler/aot] Introduce ways to dump instruction size statistics.
We add two things:

* --print_instruction_stats makes compiler dump per IL instruction size
breakdown (how many bytes of code were produced from specific instruction
kinds). This was largely implemented by kustermann@ in
https://codereview.chromium.org/2584613002/ and this CL does only few changes
to the original implementation, namely more uniform handling of slow-path code
and puts statistics object into RawInstructions (which has free space due to
alignment) instead of RawCode.

* --print_instructions_sizes_to=symbols.json makes compiler dump per Instruction
object size breakdown into a JSON file. This JSON file can later be processed
with pkg/vm/tool/run_binary_size_analysis.dart script to produce interactive
binary size diagram similar to runtime/third_party/binary_size tool.

Change-Id: Ied4965b9a0a91b3025eefbe981ecd47cdcf782d6
Reviewed-on: https://dart-review.googlesource.com/50501
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-11 13:03:16 +00:00