Skip to content

Dart_DebugName and Dart_DetectNullSafety symbols in my executable #59612

Closed
@ClementBeal

Description

@ClementBeal

Info

Problem

Hi!

Yesterday, I was trying for the first time to benchmark my code by reading the final assembly code.

That's the program I have (coming from a Twitter post) :

import 'dart:typed_data';

void main(List<String> args) {
  final u = int.parse(args[0]); 
  final r = 8372;

  final List<int> a = Uint32List(10000);

  for (int i = 0; i < 10000; i++) {
    for (int j = 0; j < 100000; j++) {
      a[i] = a[i] + j % u;
    }
    a[i] += r;
  }
  print(a[r]);
}

I compiled that code with dart compile exe my_program.dart then run objdump -d my_program.dart > output.asm to get the assembly code.

I can see a lot of Dart_DebugName and Dart_DetectNullSafety. I thought it would be compile without the debug info so I checked the available flag and with the flag -save-debugging-info, I should remove them and save them in an external file.

I run the new command dart compile exe --save-debugging-info debug.txt my_program.dart. I don't know which extension should be the debugging info file. I can already see my file getting smaller! From 5.4MB to 5.2MB!

I checked again the assembly and I still find the previous symbols Dart_DebugName and Dart_DetectNullSafety that I thought would be stripped from the final executable.

Is it a normal behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.closed-as-intendedClosed as the reported issue is expected behaviortype-questionA question about expected behavior or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions