[FFmpeg-devel] [RFC] [PATCH] Make ModeAlphabet constant in vp3.c
Diego 'Flameeyes' Pettenò
Fri Jan 11 19:28:59 CET 2008
Mike Melanson <mike at multimedia.cx> writes:
> Is there some command line tool that you are running in order to audit
> the binaries for these sub-optimalities? If so, I might want to add it
> to the automated test suite.
It's half-automated and half-human checked, I use objdump (-T for shared
libraries, -t for object files, the latter will also show static
variables) to find variables that are bound to .data (or .data.local),
.data.rel.ro (.data.local.rel.ro) or .bss, and then look at their usage
The main issue is to ignore all the *_encoder *_decoder *_parser
structures, as they all will fall into .data (because they have the
'next' pointer which is used to put the various pieces in a list).
.data (.data.local) entries are not declared constant, so they'll be
ready for Copy-On-Write at the first change;
.data.rel.ro entries will cause a Copy-On-Write at runtime relocation
(which means at load most of the times) but _could_ get mitigated by
prelink (altough prelink is totally not working with plugin-based
applications like xine).
.bss entries are initialised to zero, and will cause a Copy-On-Write at
initialisation; this latter is the case of most of the non-hardcoded
It's probably quite easy to automate this, there are many libraries to
read data from ELF files (I wrote one myself in Ruby, actually I suppose
I could also write a simple ruby script that gathers the information for
me rather than running objdump every time).
Diego "Flameeyes" Petten?
More information about the ffmpeg-devel