Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vm][flutter][android] Logs are truncated at 1024 characters #47332

Closed
dcharkes opened this issue Sep 30, 2021 · 1 comment
Closed

[vm][flutter][android] Logs are truncated at 1024 characters #47332

dcharkes opened this issue Sep 30, 2021 · 1 comment
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@dcharkes
Copy link
Contributor

In Flutter, Dart VM logs are truncated at 1024 characters:

E/DartVM  ( 6593): *** BEGIN CFG
E/DartVM  ( 6593): Unoptimized Compilation
E/DartVM  ( 6593): ==== package:flutter/src/rendering/proxy_box.dart_RenderAnnotatedRegion_set_value (SetterFunction)
E/DartVM  ( 6593): B0[graph]:0
E/DartVM  ( 6593): B1[function entry]:2
E/DartVM  ( 6593):     Constant(#0)
E/DartVM  ( 6593):     CheckStackOverflow:8(stack=0, loop=0)
E/DartVM  ( 6593):     DebugStepCheck:10()
E/DartVM  ( 6593):     t0 <- LoadLocal(newValue @1)
E/DartVM  ( 6593):     t1 <- Constant(#TypeParameter: X0; bound: Object)
E/DartVM  ( 6593):     t2 <- LoadLocal(this @2)
E/DartVM  ( 6593):     t2 <- LoadField(t2 . :type_arguments {final})
E/DartVM  ( 6593):     t3 <- Constant(#null)
E/DartVM  ( 6593):     t0 <- AssertAssignable:12(t0, t1, 'newValue', instantiator_type_args(t2), function_type_args(t3))
E/DartVM  ( 6593):     StoreLocal(newValue @1, t0)
E/DartVM  ( 6593):     goto:48 B5
E/DartVM  ( 6593): B6[function entry]:46
E/DartVM  ( 6593):     Constant(#1)
E/DartVM  ( 6593):     CheckStackOverflow:40(stack=0, loop=0)
E/DartVM  ( 6593):     DebugStepCheck:42()
E/DartVM  ( 6593):     goto:50 B5
E/DartVM  ( 6593): B5[join]:44 pred(B1, B6)
E/DartVM  ( 6593):     t0 <- LoadLocal(this @2)
E/DartVM  ( 6593):     t0 <- InstanceCall:14( get:_value@469160605<0>, t0)
E/DartVM  ( 6593):     t1 <- LoadLocal(newValue @1)
E/DartVM  ( 6593):     t0 <- InstanceCall:16( ==<0>, t0, t1 using unchecked entrypoint)
E/DartVM  ( 6593):     t1 <- LoadLocal(:t0 @-2)
E/DartVM  ( 6593):     AssertBoolean:18(t1)
E/DartVM  ( 6593):     t1 <- Constant(#true)
E/DartVM  ( 6593):     Branch if St
E/DartVM  ( 6593): *** BEGIN CFG
E/DartVM  ( 6593): Unoptimized Compilation
*** BEGIN CFG
Unoptimized Compilation
==== package:flutter/src/rendering/proxy_box.dart_RenderAnnotatedRegion_set_value (SetterFunction)
B0[graph]:0
B1[function entry]:2
    Constant(#0)
    CheckStackOverflow:8(stack=0, loop=0)
    DebugStepCheck:10()
    t0 <- LoadLocal(newValue @1)
    t1 <- Constant(#TypeParameter: X0; bound: Object)
    t2 <- LoadLocal(this @2)
    t2 <- LoadField(t2 . :type_arguments {final})
    t3 <- Constant(#null)
    t0 <- AssertAssignable:12(t0, t1, 'newValue', instantiator_type_args(t2), function_type_args(t3))
    StoreLocal(newValue @1, t0)
    goto:48 B5
B6[function entry]:46
    Constant(#1)
    CheckStackOverflow:40(stack=0, loop=0)
    DebugStepCheck:42()
    goto:50 B5
B5[join]:44 pred(B1, B6)
    t0 <- LoadLocal(this @2)
    t0 <- InstanceCall:14( get:_value@469160605<0>, t0)
    t1 <- LoadLocal(newValue @1)
    t0 <- InstanceCall:16( ==<0>, t0, t1 using unchecked entrypoint)
    t1 <- LoadLocal(:t0 @-2)
    AssertBoolean:18(t1)
    t1 <- Constant(#true)
    Branch if St

The above is exactly 1024 characters.

Related Flutter issue with a Dart workaround: flutter/flutter#22665

To reproduce this use a custom engine which allows all DartVM flags: flutter run --local-engine=android_debug_unopt_x86 --local-engine-src-path=$HOME/flt/engine/src -d emu --dart-flags --print-flow-graph,--print-flow-graph-filter=...

@dcharkes dcharkes added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Sep 30, 2021
@dcharkes dcharkes self-assigned this Sep 30, 2021
@dcharkes
Copy link
Contributor Author

Workaround: flutter run --local-engine=android_debug_unopt_x86 --local-engine-src-path=$HOME/flt/engine/src -d emu --dart-flags --print-flow-graph,--print-flow-graph-filter=convertYUV420ToImage,--force-log-flush

However, that causes many extra newlines:

E/DartVM  (11212): *** BEGIN CFG
E/DartVM  (11212): Unoptimized Compilation
E/DartVM  (11212): ==== package:flutter_match/tflite/camera_utils.dart_CameraUtils_convertYUV420ToImage (RegularFunction
E/DartVM  (11212): )
E/DartVM  (11212): B0[graph]:0
E/DartVM  (11212): 
E/DartVM  (11212): B1[function entry]:2
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): CheckStackOverflow:8(stack=0, loop=0)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): DebugStepCheck:10()
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): t0 <- LoadLocal(cameraImage @1)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): t0 <- InstanceCall:12( get:width<0>, t0)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): StoreLocal(width @-1, t0)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): t0 <- LoadLocal(cameraImage @1)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): t0 <- InstanceCall:14( get:height<0>, t0)
E/DartVM  (11212): 
E/DartVM  (11212):     
E/DartVM  (11212): StoreLocal(height @-2, t0)
E/DartVM  (11212): 
E/DartVM  (11212):     

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

1 participant