Closed Bug 1455006 Opened 7 years ago Closed 7 years ago

Java thread not collecting any samples on (some?) phones

Categories

(Core :: Gecko Profiler, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: snorp, Assigned: m_kato)

References

Details

Attachments

(3 files)

This worked at one point, but seems to be broken currently.
Marking the dependency, but I expect this will likely be just a dupe.
Depends on: 1449983
Priority: -- → P1
The fix from bug 1449983 doesn't seem to be enough: https://perfht.ml/2vZ0LCI I don't see any Java-related frames and the Java Main Thread is empty.
> The fix from bug 1449983 doesn't seem to be enough: https://perfht.ml/2vZ0LCI > I don't see any Java-related frames and the Java Main Thread is empty.
Flags: needinfo?(m_kato)
(In reply to Panos Astithas [:past] (please ni?) from comment #3) > The fix from bug 1449983 doesn't seem to be enough: https://perfht.ml/2vZ0LCI > I don't see any Java-related frames and the Java Main Thread is empty. I cannot reproduce it on my Nexus 5X device (Android 8.1) using Nightly 2018-04-30. What device and OS version?
Flags: needinfo?(m_kato) → needinfo?(past)
I'm using a Moto G5 Plus with Android 7.0 using the latest nightly. I'm recording the profile using WebIDE to connect and then use the new performance panel (devtools.performance.new-panel-enabled=true) to profile using the features Native Stacks, JavaScript and Java. Could you share a profile and how you recorded it? I'm curious to see how it's different from mine.
Flags: needinfo?(past)
I get this by new performance panel via WebIDE + USB connect.
Weird. I can see that in my system I get this path for libxul.so: /data/app/org.mozilla.fennec_aurora-2/base.apk!/assets/armeabi-v7a/libxul.so while you appear to be getting: /data/app/org.mozilla.fennec_aurora-59qLqSLnwyw51t7COdYwPA==/base.apk!/assets/armeabi-v7a/libxul.so Not sure if this is related or not. Could you share a screenshot of the settings pane from the performance panel to compare? Also, what is it that you are profiling? I have a tab open that I scroll around and then open a new tab. Is this interaction supposed to add Java stacks in the profile?
Assignee: nobody → m_kato
I saw another profile from mstange that had java stacks, so it's not just working for you. Unsure if it is only broken for me though.
Summary: Get Java profiling working again on Android → Java thread not collecting any samples on (some?) phones
Panos, could you test https://queue.taskcluster.net/v1/task/TgDCS3SsQF622Bv9ThTB4A/runs/0/artifacts/public/build/target.apk ? And I would like adb logcat log when start profiling.
Flags: needinfo?(past)
Maybe, logcat shows "Main thread not found" when starting profile...
Couldn't it be just bug 1460973 ?
So far we got Java stacks on OnePlus 5 (Android 8): https://perfht.ml/2J14BR4 Nexus 5 (Android 5): https://perfht.ml/2klqlci But even when it works, the stacks are erratic. Nothing is reported for the most part (bug 1460973) and when it has stacks, the sampling rate is much lower (around 10ms) than the rest of the profile (1ms). Didn't work on so far for: Moto G5 (Android 7) The Android team confirmed that this is not on the critical path for GeckoView's performance (all GeckoView integration APIs are async, so Java is less likely to impact content performance); so we will not block remote debugging m1 on this but want to have this working in the medium term.
With the build from comment 12 I am getting Java stacks: https://perfht.ml/2scTUAn I will attach the logs from that session.
Flags: needinfo?(past)
Attached file WebIDE console log
This is from WebIDE's console.
(In reply to :Harald Kirschner :digitarald from comment #15) > But even when it works, the stacks are erratic. Nothing is reported for the > most part (bug 1460973) and when it has stacks, the sampling rate is much > lower (around 10ms) than the rest of the profile (1ms). Sampling is capped to 10 ms here: https://searchfox.org/mozilla-central/rev/bf4def01bf8f6ff0d18f02f2d7e9efc73e12c63f/mobile/android/base/java/org/mozilla/gecko/GeckoJavaSampler.java#69-70 This is BenWa's comment from 2013: https://bugzilla.mozilla.org/show_bug.cgi?id=788022#c13 Maybe this works well enough now without capping in our reference hardware?
(In reply to Panos Astithas [:past] (please ni?) from comment #19) > (In reply to :Harald Kirschner :digitarald from comment #15) > > But even when it works, the stacks are erratic. Nothing is reported for the > > most part (bug 1460973) and when it has stacks, the sampling rate is much > > lower (around 10ms) than the rest of the profile (1ms). > > Sampling is capped to 10 ms here: > > https://searchfox.org/mozilla-central/rev/ > bf4def01bf8f6ff0d18f02f2d7e9efc73e12c63f/mobile/android/base/java/org/ > mozilla/gecko/GeckoJavaSampler.java#69-70 https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/tools/profiler/core/platform.cpp#2913 has another check. > > This is BenWa's comment from 2013: > > https://bugzilla.mozilla.org/show_bug.cgi?id=788022#c13 > > Maybe this works well enough now without capping in our reference hardware? I will file a new bug for changing new interval.
(In reply to Panos Astithas [:past] (please ni?) from comment #16) > With the build from comment 12 I am getting Java stacks: > https://perfht.ml/2scTUAn Thanks. OK, I will request review to gv team.
Attachment #8981100 - Flags: review?(nchen)
Comment on attachment 8981100 [details] Bug 1455006 - Use Looper to get main thread instead of main thread name. https://reviewboard.mozilla.org/r/247208/#review253726
Attachment #8981100 - Flags: review?(nchen) → review+
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/347ccb93cb08 Use Looper to get main thread instead of main thread name. r=jchen
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: