Closed Bug 854521 Opened 11 years ago Closed 10 years ago

Investigate external access of libxul symbols on phone for valgrind

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: qdot, Assigned: qdot)

References

Details

One of the major issues with iterative valgrinding on the phone is moving symbols, which can take 10+ minutes per copy. I believe busybox comes with a mount that should let us NFS mount, so it'd be interesting to see if we could just nfs mount symbols versus copying to the phone every time.
Summary: Investigate NFS mounting of libxul symbols on phone for valgrind → Investigate NFS/fuse mounting of libxul symbols on phone for valgrind
I think we'd need to get the NFS filesystem compiled into the kernel (or available as a module).

It doesn't seem to show up in /proc/filesystems on my unagi.
Recompiling kernels on the target phones is pretty much infeasible, and
we would need to do that in order to get NFS filesystem support.

I already started work on Plan B, which is to add to Valgrind's
debuginfo reader, the ability to pull debuginfo from a simple 
custom server running on the host (via TCP).  It's not entirely
simple because it involves inserting an abstraction layer in the
debuginfo reader, where V currently simply fished bits out of
mmap-ed in memory.

Inserting the abstraction layer also solves a different problem 
with phones and 32-bit systems in general, which is that mmap-ing
in the insanely huge libxul.so (with "-g -O", is 1160MB) to read
its debuginfo simply fails due to lack of address space.
Summary: Investigate NFS/fuse mounting of libxul symbols on phone for valgrind → Investigate external access of libxul symbols on phone for valgrind
(In reply to Julian Seward from comment #2)
> I already started work on Plan B, which is to add to Valgrind's
> debuginfo reader, the ability to pull debuginfo from a simple 
> custom server running on the host (via TCP).  [..]

This is now available on a branch, and I have been using it 
successfully with Fennec for a few days.  It can transfer the
debuginfo for an 1160MB libxul.so over an 11g link to a phone
in about 2.5 minutes, which is a big improvement over my
previous scenario.

See http://sourceforge.net/mailarchive/message.php?msg_id=31011828
for details.  Testing and feedback welcome.
Using compression for moving the symbols in bug 977156 gets us down to around 2 minutes for a reload, which is acceptable. So just calling this fixed via that patch.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
The debuginfo server referred to in comment 3 ships as standard in
Valgrind 3.9.0, btw.  It can generally provide full unwind/symbol/
line number information for Valgrind on the target whilst transporting
only about 10% of the debuginfo lubxul.so over the link.
You need to log in before you can comment on or make changes to this bug.