mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Add full oatdump output behind filters (#7233)
This change makes full oatdump output visible behind the "Directives" filter. This does the same thing as the --full-output flag, but is more-easily used. The default code snippets have been updated to include this.
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
// For R8, please load R8Example for an example with a keep annotation,
|
||||
// which will prevent unused code from being removed from the final output.
|
||||
//
|
||||
// For dex2oat, 'Filter...' > 'Directives' can be unchecked for full
|
||||
// oatdump output.
|
||||
//
|
||||
// (For advanced use only) Click "Templates > Android Java IDE" for
|
||||
// profile-guided compilation.
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
// For R8, please load R8Example for an example with a keep annotation,
|
||||
// which will prevent unused code from being removed from the final output.
|
||||
//
|
||||
// For dex2oat, 'Filter...' > 'Directives' can be unchecked for full
|
||||
// oatdump output.
|
||||
//
|
||||
// (For advanced use only) Click "Templates > Android Kotlin IDE" for
|
||||
// profile-guided compilation.
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ export class Dex2OatCompiler extends BaseCompiler {
|
||||
};
|
||||
}
|
||||
|
||||
override async processAsm(result) {
|
||||
override async processAsm(result, filters: ParseFiltersAndOutputOptions) {
|
||||
let asm: string = '';
|
||||
|
||||
if (typeof result.asm === 'string') {
|
||||
@@ -381,7 +381,7 @@ export class Dex2OatCompiler extends BaseCompiler {
|
||||
}
|
||||
|
||||
const segments: ParsedAsmResultLine[] = [];
|
||||
if (this.fullOutput) {
|
||||
if (this.fullOutput || !filters.directives) {
|
||||
// Returns entire dex2oat output.
|
||||
segments.push({text: asm, source: null});
|
||||
} else {
|
||||
|
||||
@@ -97,7 +97,7 @@ describe('dex2oat', () => {
|
||||
const objdumpResult = {
|
||||
asm,
|
||||
};
|
||||
const processed = await compiler.processAsm(objdumpResult);
|
||||
const processed = await compiler.processAsm(objdumpResult, compiler.getDefaultFilters());
|
||||
expect(processed).toHaveProperty('asm');
|
||||
const actualSegments = (processed as {asm: ParsedAsmResultLine[]}).asm;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user