On 9/20/2012 9:14 AM, Estanislao Gonzalez wrote:
Hi,
This is probably nothing... but I was testing something else and I wondered why
there are so many calls to getrlimit about the size of the stack...
These are the "top 10" calls from one second dump of strace for the xulrunner
process (first field is the count):
$ (strace -p 10762 2>&1 & sleep 1 && pkill strace) | awk '{a[$0]+=1} END {for
(k in a) {print a[k],k}}' | sort -k 1 -rn | head
58498 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
53 read(13, 0xb4d65058, 4096) = -1 EAGAIN (Resource temporarily
unavailable)
26 poll([{fd=4, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}],
3, 0) = 0 (Timeout)
16 poll([{fd=4, events=POLLIN}, {fd=13, events=POLLIN}], 2, 0) = 0 (Timeout)
12 semop(131073, {{0, -1, SEM_UNDO}}, 1) = 0
12 semop(131073, {{0, 1, SEM_UNDO}}, 1) = 0
6 poll([{fd=4, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}],
3, 9) = 0 (Timeout)
5 write(7, "!", 1) = 1
5 read(6, "!", 1) = 1
5 poll([{fd=4, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}],
3, 0) = 1 ([{fd=6, revents=POLLIN}])
so there are almost 60.000 calls per second (min:53.000 max:64.000) to
RLIMIT_STACK ...
This is while running Firefox? Or some other XULRunner-based app?
The ps list below shows seems to indicate that you're seeing the
plugin-container process for Flash player. If this is correct, and
you're looking at a Flash-based video, it is *probably* the Flash player
code which is making these getrlimit calls. It would be good to get
some basic stack traces from the calls to verify my hunch, of course. If
they walk directly into libflashplayer.so then this is something you
should report to Adobe.
Does anyone know how expensive getrlimit is?
--BDS
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform