Giter VIP home page Giter VIP logo

Comments (7)

fmayer avatar fmayer commented on May 14, 2024

Hey! Would it be possible for you upload the .so so I can take a look? We unwind using DWARF data.

Feel free to join our Discord (https://discordapp.com/channels/629013440635207702/629013441096450058) for more real-time debugging help - I am fmayer there :)

from perfetto.

fmayer avatar fmayer commented on May 14, 2024

Also, could you attach the output of adb logcat | grep "perfetto\|heapprofd" so I can see if there is something suspicious there?

from perfetto.

tmm1 avatar tmm1 commented on May 14, 2024
04-28 09:49:18.836 19072 19072 I perfetto: perfetto_cmd.cc:604 Connected to the Perfetto traced service, starting tracing for 604800000 ms
04-28 09:49:18.839  7385  7385 I perfetto: tracing_service_impl.cc:529 Configured tracing, #sources:2, duration:604800000 ms, #buffers:1, total buffer size:32768 KB, total sessions:2
04-28 09:49:58.263 19072 19072 I perfetto: perfetto_cmd.cc:815 SIGINT/SIGTERM received: disabling tracing.
04-28 09:49:58.407  7386  7386 I perfetto: probes_producer.cc:314 Producer stop (id=7)
04-28 09:49:58.410 19072 19072 I perfetto: perfetto_cmd.cc:674 Trace written into the output file
04-28 09:49:58.425  7385  7385 I perfetto: tracing_service_impl.cc:1660 Tracing session 3 ended, total sessions:1
04-28 09:49:58.579  7102  7174 E perfetto: client.cc:375 Failed to send control socket byte. (errno: 32, Broken pipe)
04-28 09:49:58.579  7102 19125 E perfetto: client.cc:375 Failed to send control socket byte. (errno: 32, Broken pipe)
04-28 10:38:47.374  7600  7600 I perfetto: perfetto_cmd.cc:815 SIGINT/SIGTERM received: disabling tracing.
04-28 10:38:47.380  7386  7386 I perfetto: probes_producer.cc:314 Producer stop (id=4)
04-28 10:38:47.381  7600  7600 I perfetto: perfetto_cmd.cc:674 Trace written into the output file
04-28 10:38:47.391  7385  7385 I perfetto: tracing_service_impl.cc:1660 Tracing session 2 ended, total sessions:0
^C

I wasn't using PERFETTO_BINARY_PATH above, could that be part of the problem?

from perfetto.

fmayer avatar fmayer commented on May 14, 2024

Ad PERFETO_BINARY_PATH: That shouldn't be the cause, as that would still show the unsymbolized frames.

from perfetto.

fmayer avatar fmayer commented on May 14, 2024

The library had all the unwinding information stripped. We need one of

  • .gnu_debugdata
  • .eh_frame (+ preferably .eh_frame_hdr)
  • .debug_frame.

We do not support frame-pointer unwinding.

@tmm1 could you add your changes to your build to this bug for posterity?

from perfetto.

tmm1 avatar tmm1 commented on May 14, 2024

So the issue was that the android build process strips all the jniLibs. I tried LOCAL_STRIP_MODE := none, but ultimately what worked was adding packagingOptions.doNotStrip "**/*.so" to my app/build.grade

See https://stackoverflow.com/questions/40355200/how-to-avoid-stripping-for-native-code-symbols-for-android-app


FYI, to anyone who ends up here:

The library had all the unwinding information stripped

You can check this yourself using readelf -S libname.so and see if one of the debug sections is listed. The list of known sections can be seen inside libunwindstack

  • .gnu_debugdata

This is a compressed version of .debug_frame and can be generated with something like do_strip_keep_mini_debug_info

from perfetto.

tmm1 avatar tmm1 commented on May 14, 2024

ultimately what worked was adding packagingOptions.doNotStrip "**/*.so" to my app/build.grade

There is a way to do this with just debug builds now in AGP 7.0.0: https://issuetracker.google.com/issues/155215248#comment5

from perfetto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.