[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-dev] Gnash memory allocation statistics
From: |
Albert Lee |
Subject: |
[Gnash-dev] Gnash memory allocation statistics |
Date: |
Tue, 15 Dec 2009 23:32:11 -0500 |
User-agent: |
RoundCube Webmail/0.3-trunk |
Hi,
I probed malloc calls in Gnash on a whim and have some surprising (to me)
results.
This is a typical distribution of allocation sizes while running TeddyMark
(which runs slightly faster with Mozilla's jemalloc than ptmalloc version
2):
value ------------- Distribution ------------- count
0 | 0
1 | 41
2 | 1
4 | 68
8 |@@@ 2259
16 |@@@@@@@@@@@@@@@ 11378
32 |@ 893
64 |@@@ 2703
128 |@@ 1431
256 |@@@@@@ 4369
512 |@@ 1168
1024 |@@@@ 3006
2048 |@@ 1860
4096 |@ 1036
8192 | 0
16384 | 0
32768 | 0
65536 |@ 830
131072 | 3
262144 | 0
The main culprit for 16-byte allocations seems to be:
CPU ID FUNCTION:NAME
0 69953 malloc:entry
libc.so.1`malloc
libCrun.so.1`void*operator new(unsigned)+0x38
libgnashcore-0.8.6.so`void
gnash::DisplayObject::queueEvent(const gnash::event_id&,int)+0x35
libgnashcore-0.8.6.so`void gnash::MovieClip::advance()+0xfc
libgnashcore-0.8.6.so`void
gnash::movie_root::advanceLiveChar(boost::intrusive_ptr<gnash::DisplayObject>)+0x72
libgnashcore-0.8.6.so`__type_1
std::for_each<std::_List_iterator<gnash::DisplayObject*,std::_Nonconst_traits<gnash::DisplayObject*>
>,boost::_bi::bind_t<void,void(*)(boost::intrusive_ptr<gnash::DisplayObject>),boost::_bi::list1<boost::arg<1>
> > >(__type_0,__type_0,__type_1)+0x41
libgnashcore-0.8.6.so`void
gnash::movie_root::advanceLiveChars()+0x61
libgnashcore-0.8.6.so`void
gnash::movie_root::advanceMovie()+0x2c
libgnashcore-0.8.6.so`bool gnash::movie_root::advance()+0x68
gtk-gnash`bool gnash::Gui::advanceMovie()+0x3a
libglib-2.0.so.0.2200.2`g_timeout_dispatch+0x23
libglib-2.0.so.0.2200.2`g_main_context_dispatch+0x262
libglib-2.0.so.0.2200.2`g_main_context_iterate+0x483
libglib-2.0.so.0.2200.2`g_main_loop_run+0x1dd
libgtk-x11-2.0.so.0.1800.3`gtk_main+0xb7
gtk-gnash`bool gnash::GtkGui::run()+0x1c
gtk-gnash`int gnash::Player::run(int,char**,const
std::string &,const std::string &)+0x1656
gtk-gnash`main+0xac
gtk-gnash`_start+0x7d
I get a similar preponderance of 16-byte allocs with other Flash movies.
Maybe QueuedEvent objects could be created by a different method?
There's probably useful tests I can also run. Suggestions welcome.
-Albert
- [Gnash-dev] Gnash memory allocation statistics,
Albert Lee <=