Internships/ProjectIdeas/TCGCodeQuality: Difference between revisions
(Add some more details based on questions from applicants so far) |
|||
Line 4: | Line 4: | ||
Improving the code generation of the TCG backend is a hard task that involves reading through large amounts of text looking for anomalies in the generated code. It would be nice to have tools to more readily extract and parse code generation information. This would include: | Improving the code generation of the TCG backend is a hard task that involves reading through large amounts of text looking for anomalies in the generated code. It would be nice to have tools to more readily extract and parse code generation information. This would include: | ||
Modifying code generator, dumping additional data | |||
* which are hot blocks (frequently run, hence more important performance wise) | * which are hot blocks (frequently run, hence more important performance wise) | ||
* export block JIT information for perf tool | * export block JIT information for perf tool (the later version) | ||
Tweaking -d op,out_asm output | |||
* how many fills/spills in a block (where register contents are moved due to register pressure) | * how many fills/spills in a block (where register contents are moved due to register pressure) | ||
* number of host instructions for each guest instruction (JIT profiling has a basic version of this) | * number of host instructions for each guest instruction (JIT profiling has a basic version of this) | ||
* elide or beautify common blocks like softmmu access macros (which are always the same) | * elide or beautify common blocks like softmmu access macros (which are always the same) | ||
Modifying the HMP | |||
* support interactive exploration of translation state (system emulation) | * support interactive exploration of translation state (system emulation) | ||
This work could be a pre-cursor to supporting [[Internships/ProjectIdeas/Multi-exit Hot Blocks]] | QEMU currently only works on translating simple basic blocks with one or two exit paths. This work could be a pre-cursor to supporting [[Internships/ProjectIdeas/Multi-exit Hot Blocks]] in the future. | ||
'''Links:''' | '''Links:''' | ||
* [[Documentation/TCG]] | * [[Documentation/TCG]] | ||
* Hacky PoC of interactive translate info [http://patches.linaro.org/patch/113269/] | |||
'''Details:''' | '''Details:''' |
Revision as of 11:05, 27 March 2019
Measure Tiny Code Generation Quality
Summary: Improve the diagnostics tools to asses code quality
Improving the code generation of the TCG backend is a hard task that involves reading through large amounts of text looking for anomalies in the generated code. It would be nice to have tools to more readily extract and parse code generation information. This would include:
Modifying code generator, dumping additional data
- which are hot blocks (frequently run, hence more important performance wise)
- export block JIT information for perf tool (the later version)
Tweaking -d op,out_asm output
- how many fills/spills in a block (where register contents are moved due to register pressure)
- number of host instructions for each guest instruction (JIT profiling has a basic version of this)
- elide or beautify common blocks like softmmu access macros (which are always the same)
Modifying the HMP
- support interactive exploration of translation state (system emulation)
QEMU currently only works on translating simple basic blocks with one or two exit paths. This work could be a pre-cursor to supporting Internships/ProjectIdeas/Multi-exit Hot Blocks in the future.
Links:
- Documentation/TCG
- Hacky PoC of interactive translate info [1]
Details:
- Skill level: intermediate or advanced, understanding of code generation (compilers/JITs)
- Language: C, Assembly (x86 or preferred host)
- Mentor: Alex Bennée <alex.bennee@linaro.org> (stsquad on #qemu IRC)
- Suggested by: Alex Bennée