My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 50507: ffmpeg roll caused XP Perf regression
4 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  fbarch...@chromium.org
Closed:  Jul 2010
Cc:  jeremy@chromium.org, cmp@chromium.org
M-6

Restricted
  • Only users with EditIssue permission may comment.


Sign in to add a comment
 
Project Member Reported by jeremy@chromium.org, Jul 28, 2010
crrev.com/53885 caused a regression in the XP perf tests, I reverted it at crrev.com/53296 and the test went green.

Bad test run:
http://build.chromium.org/buildbot/waterfall/builders/XP%20Perf%20(1)/builds/9081
Jul 28, 2010
#1 scherkus@chromium.org
We took a look at the regression and it appears to be the vm_pk_r stat...

FAILING TEST (http://build.chromium.org/buildbot/waterfall/builders/XP%20Perf%20(1)/builds/9094)
PERF_REGRESS: vm_peak_r/vm_pk_r IO_b: 43.4k (42.8k) IO_b_extcs1: 43.3k IO_op_b: 49.3k (53.4k) IO_op_b_extcs1: 54.3k IO_op_r: 28.5k (27.9k) IO_op_r_extcs1: 28.1k IO_r: 7.84k (7.54k) IO_r_extcs1: 7.68k t: 1.1k (1.08k) t_extcs1: 1.09k vm_pk_b: 15.0M (14.0M) vm_pk_b_extcs1: 16.3M vm_pk_r: 70.6M (83.7M) vm_pk_r_extcs1: 70.6M vm_spk_r: 70.6M (83.7M) vm_spk_r_extcs1: 70.6M ws_pk_b: 31.0M (28.8M) ws_pk_b_extcs1: 32.3M ws_pk_r: 65.5M (79.6M) ws_pk_r_extcs1: 65.7M ws_spk_r: 65.5M (79.6M) ws_spk_r_extcs1: 65.7M

PASSING TEST (http://build.chromium.org/buildbot/waterfall/builders/XP%20Perf%20(1)/builds/9097)
IO_b: 43.4k (42.8k) IO_b_extcs1: 43.3k IO_op_b: 49.2k (53.6k) IO_op_b_extcs1: 54.3k IO_op_r: 28.4k (27.9k) IO_op_r_extcs1: 28.0k IO_r: 7.84k (7.55k) IO_r_extcs1: 7.68k t: 1.1k (1.08k) t_extcs1: 1.09k vm_pk_b: 15.0M (13.9M) vm_pk_b_extcs1: 16.3M vm_pk_r: 68.9M (83.8M) vm_pk_r_extcs1: 68.8M vm_spk_r: 68.9M (83.8M) vm_spk_r_extcs1: 68.8M ws_pk_b: 31.0M (28.9M) ws_pk_b_extcs1: 32.2M ws_pk_r: 65.5M (79.6M) ws_pk_r_extcs1: 65.5M ws_spk_r: 65.5M (79.6M) ws_spk_r_extcs1: 65.5M


So passing when vm_ok_r is 68.9M but failing when vm_pk_r is 70.6M.  If this is measure peak virtual memory then I think we need to bump up the threshold.  A while back we added a whole new codec + container to FFmpeg (VP8 + WebM), which would cause additional VM usage while the renderer process is running.  We probably should have bumped up the threshold then, but we've been getting lucky until we attempted to update the FFmpeg binary again.

That's my take on it -- but I have no idea how page_cycler_moz works :(
Status: Assigned
Labels: -Pri-2 -Area-Undefined Pri-1 Area-WebKit Mstone-6 OS-Windows Feature-Media
Jul 28, 2010
#2 evan@chromium.org
Why are we spending memory on media codecs when the test doesn't involve any media?
Jul 28, 2010
#3 scherkus@chromium.org
Guess because the library is loaded before the sandbox is engaged via LoadLibrary()
Jul 28, 2010
#4 evan@chromium.org
Is this unpaged memory, then?
Jul 28, 2010
#5 fbarch...@chromium.org
I agree with Andrew, that adding WebM increased size, and likely hasn't been accounted for and we're right on the edge.

cpu points out +1.6 MB memory usage
A graph showing increased VM usage
http://build.chromium.org/buildbot/perf/xp-release-dual-core/dhtml/report.html?history=150&rev=-1&graph=vm_peak_r
before roll 31,793,152
after roll 33,587,200
increase 1,794,048

File sizes before the roll
  890,880 avcodec-52.dll
  132,608 avformat-52.dll
   65,536 avutil-50.dll
 1,089,024 bytes

File sizes before the roll
 908,288 avcodec-52.dll
 149,504 avformat-52.dll
  84,992 avutil-50.dll
1,142,784 bytes
No new functionality was added to chromium, but updates to both ogg and webm increased code size by 53760 bytes.

The physical size takes a little more load time and vm. But not 1.6 MB.

I've been seeing numerous ffmpeg CL's that went from dynamic allocations to statically allocated arrays. ie int array[MAX_ARRAY];
My guess is they did it to improve performance but hurt memory usage (data segment)

Size tool shows code/data/bss sizes

Before roll
c:\src\chromium\src\third_party\ffmpeg\binaries\chromium\win\ia32>size avcodec-52.dll
   text    data     bss     dec     hex filename
 883050    5188  303536 1191774  122f5e avcodec-52.dll

c:\src\chromium\src\third_party\ffmpeg\binaries\chromium\win\ia32>size avformat-52.dll
   text    data     bss     dec     hex filename
 126746    3100    2624  132470   20576 avformat-52.dll

c:\src\chromium\src\third_party\ffmpeg\binaries\chromium\win\ia32>size avutil-50.dll
   text    data     bss     dec     hex filename
  61307    1212   18496   81015   13c77 avutil-50.dll

Size of binaries after roll.  bss is fairly high (uninitialized data)
c:\src\chromium\deps\third_party\ffmpeg\binaries\win>size avcodec-52.dll
   text    data     bss     dec     hex filename
 899735    5400 1878448 2783583  2a795f avcodec-52.dll

c:\src\chromium\deps\third_party\ffmpeg\binaries\win>size avformat-52.dll
   text    data     bss     dec     hex filename
 143895    3528    2624  150047   24a1f avformat-52.dll

c:\src\chromium\deps\third_party\ffmpeg\binaries\win>size avutil-50.dll
   text    data     bss     dec     hex filename
  80505    1628   18800  100933   18a45 avutil-50.dll

Total before roll: 1405259
Total after roll: 3034563
Increase: 1629304

Jul 28, 2010
#6 fbarch...@chromium.org
So its looking like a legitimate code change in ffmpeg caused the increase memory usage.  Most of the increase is in avcodec-52.dll which contains libvpx, vorbis, vp3 and theora.

This is the configure command for chromium:

./configure --disable-everything --disable-decoders --disable-protocols --disable-parsers --disable-avfilter --disable-avdevice --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-ffprobe --enable-shared --disable-static --disable-debug --disable-network --disable-gpl --disable-bzlib --disable-zlib --enable-decoder=theora --enable-decoder=vorbis --enable-demuxer=ogg --enable-pthreads --enable-yasm --enable-memalign-hack --cc=gcc-sjlj --prefix=./chromium-ffmpeg --enable-libvpx --enable-decoder=libvpx --enable-demuxer=matroska --extra-cflags='-I../../usr/local/include'


install prefix            ./chromium-ffmpeg
source path               /c/ff/ffmpeg-mt
C compiler                gcc-sjlj
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     no
yasm                      yes
MMX enabled               yes
MMX2 enabled              yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
CMOV enabled              no
CMOV is fast              no
EBX available             yes
EBP available             yes
10 operands supported     yes
debug symbols             no
strip symbols             yes
optimizations             yes
static                    no
shared                    yes
postprocessing support    no
new filter support        no
filters using lavformat   no
network support           no
threading support         pthreads
SDL support               no
Sun medialib support      no
AVISynth enabled          no
libdc1394 support         no
libdirac enabled          no
libfaac enabled           no
libgsm enabled            no
libmp3lame enabled        no
libnut enabled            no
libopencore-amrnb support no
libopencore-amrwb support no
libopenjpeg enabled       no
librtmp enabled           no
libschroedinger enabled   no
libspeex enabled          no
libtheora enabled         no
libvorbis enabled         no
libvpx enabled            yes
libx264 enabled           no
libxvid enabled           no
zlib enabled              no
bzlib enabled             no

Enabled decoders:
libvpx                  vorbis                  vp3
theora

Enabled encoders:

Enabled hwaccels:

Enabled parsers:

Enabled demuxers:
matroska                ogg

Enabled muxers:

Enabled protocols:

Enabled filters:

Enabled bsfs:

Enabled indevs:

Enabled outdevs:

License: LGPL version 2.1 or later
Creating config.mak and config.h...

Nothing stands out as wrong.  The configure command did change, because ffmpeg added more libraries and tools that needed to be disabled.
More assembly is used as ffmpeg transitions more of it to LGPL.

Here is a breakdown on size of each object file
    112       0      16     128      80 libavcodec\allcodecs.o
   3104       0       0    3104     c20 libavcodec\audioconvert.o
    384       0       0     384     180 libavcodec\avfft.o
    560       0       0     560     230 libavcodec\avpacket.o
   3280       0       0    3280     cd0 libavcodec\bitstream.o
    304       0      16     320     140 libavcodec\bitstream_filter.o
   9280       0       0    9280    2440 libavcodec\dirac.o
 140912       0    4512  145424   23810 libavcodec\dsputil.o
   2736       0       0    2736     ab0 libavcodec\faanidct.o
   4544       0  262112  266656   411a0 libavcodec\fft.o
   2816       0       0    2816     b00 libavcodec\golomb.o
   8224       0       0    8224    2020 libavcodec\imgconvert.o
   4704       0       0    4704    1260 libavcodec\jrevdct.o
    928      96       0    1024     400 libavcodec\libvpxdec.o
   1936       0   32640   34576    8710 libavcodec\mdct.o
   2176     384       0    2560     a00 libavcodec\mpeg12data.o
   4096       0       0    4096    1000 libavcodec\mpeg4audio.o
   5664       0       0    5664    1620 libavcodec\opt.o
  30544       0       0   30544    7750 libavcodec\options.o
   2208       0      16    2224     8b0 libavcodec\parser.o
   5888       0       0    5888    1700 libavcodec\pthread.o
    816       0       0     816     330 libavcodec\raw.o
   2768       0       0    2768     ad0 libavcodec\resample.o
   2448       0       0    2448     990 libavcodec\resample2.o
   7120       0       0    7120    1bd0 libavcodec\simple_idct.o
  12784       0      96   12880    3250 libavcodec\utils.o
   1344       0       0    1344     540 libavcodec\vorbis.o
  33920       0       0   33920    8480 libavcodec\vorbis_data.o
  31424      96       0   31520    7b20 libavcodec\vorbis_dec.o
  46112     192       0   46304    b4e0 libavcodec\vp3.o
   4400       0       0    4400    1130 libavcodec\vp3dsp.o
    320       0       0     320     140 libavcodec\xiph.o
    192       0       0     192      c0 libavcodec\x86\cpuid.o
    128       0       0     128      80 libavcodec\x86\dnxhd_mmx.o
 149984       0      16  150000   249f0 libavcodec\x86\dsputil_mmx.o
   3061       0       0    3061     bf5 libavcodec\x86\dsputil_yasm.o
   3472     544       0    4016     fb0 libavcodec\x86\fdct_mmx.o
    112       0       0     112      70 libavcodec\x86\fft.o
    704       0       0     704     2c0 libavcodec\x86\fft_3dn.o
    656       0       0     656     290 libavcodec\x86\fft_3dn2.o
   6897       0       0    6897    1af1 libavcodec\x86\fft_mmx.o
    896       0       0     896     380 libavcodec\x86\fft_sse.o
   4416       0       0    4416    1140 libavcodec\x86\idct_mmx_xvid.o
   5504       0       0    5504    1580 libavcodec\x86\idct_sse2_xvid.o
   3680       0       0    3680     e60 libavcodec\x86\motion_est_mmx.o
  14992       0       0   14992    3a90 libavcodec\x86\mpegvideo_mmx.o
  23152       0       0   23152    5a70 libavcodec\x86\simple_idct_mmx.o
   2464       0       0    2464     9a0 libavcodec\x86\vp3dsp_mmx.o
   1376       0       0    1376     560 libavcodec\x86\vp3dsp_sse2.o
    224       0      16     240      f0 libavfilter\allfilters.o
   4128       0     288    4416    1140 libavfilter\avfilter.o
   1776       0       0    1776     6f0 libavfilter\avfiltergraph.o
   1040       0       0    1040     410 libavfilter\defaults.o
   1072       0       0    1072     430 libavfilter\formats.o
   2832       0       0    2832     b10 libavfilter\graphparser.o
   3104    1120       0    4224    1080 libavfilter\parseutils.o
    576     448       0    1024     400 libavfilter\vf_aspect.o
   1568     224       0    1792     700 libavfilter\vf_crop.o
    688     448       0    1136     470 libavfilter\vf_format.o
     64     224       0     288     120 libavfilter\vf_null.o
   4912     352      48    5312    14c0 libavfilter\vf_pad.o
    832     224       0    1056     420 libavfilter\vf_pixdesctest.o
   2128     224       0    2352     930 libavfilter\vf_scale.o
    736     224       0     960     3c0 libavfilter\vf_slicify.o
   2112     224       0    2336     920 libavfilter\vf_unsharp.o
    416     224       0     640     280 libavfilter\vf_vflip.o
     96     128      48     272     110 libavfilter\vsink_nullsink.o
    976     128      48    1152     480 libavfilter\vsrc_buffer.o
    352     128      48     528     210 libavfilter\vsrc_nullsrc.o
     64       0      16      80      50 libavformat\allformats.o
   1984      16      16    2016     7e0 libavformat\avio.o
   5664       0       0    5664    1620 libavformat\aviobuf.o
   1440       0       0    1440     5a0 libavformat\cutils.o
   2336       0       0    2336     920 libavformat\isom.o
   1696       0       0    1696     6a0 libavformat\matroska.o
  22112      96       0   22208    56c0 libavformat\matroskadec.o
   1344       0       0    1344     540 libavformat\metadata.o
   3248       0       0    3248     cb0 libavformat\metadata_compat.o
   4416      96       0    4512    11a0 libavformat\oggdec.o
   1120       0       0    1120     460 libavformat\oggparseogm.o
    704       0       0     704     2c0 libavformat\oggparseskeleton.o
   1408       0       0    1408     580 libavformat\oggparsetheora.o
   1920       0       0    1920     780 libavformat\oggparsevorbis.o
   1696       0       0    1696     6a0 libavformat\options.o
      0       0       0       0       0 libavformat\os_support.o
   3088       0       0    3088     c10 libavformat\riff.o
    192       0       0     192      c0 libavformat\rm.o
   8816     192       0    9008    2330 libavformat\rmdec.o
     32       0       0      32      20 libavformat\sdp.o
   4416       0       0    4416    1140 libavformat\seek.o
  43536       0      16   43552    aa20 libavformat\utils.o
    496       0       0     496     1f0 libavformat\vorbiscomment.o
    416       0       0     416     1a0 libavutil\adler32.o
   2976       0    8704   11680    2da0 libavutil\aes.o
    672       0       0     672     2a0 libavutil\avstring.o
    608       0       0     608     260 libavutil\base64.o
    784       0    5152    5936    1730 libavutil\crc.o
   3824       0       0    3824     ef0 libavutil\des.o
    304       0       0     304     130 libavutil\error.o
   5232       0       0    5232    1470 libavutil\eval.o
    704       0       0     704     2c0 libavutil\fifo.o
   1424       0       0    1424     590 libavutil\intfloat_readwrite.o
    384       0       0     384     180 libavutil\lfg.o
   1168       0       0    1168     490 libavutil\lls.o
   1168      16    2112    3296     ce0 libavutil\log.o
   1616       0       0    1616     650 libavutil\lzo.o
   2880       0       0    2880     b40 libavutil\mathematics.o
   2080       0       0    2080     820 libavutil\md5.o
    368       0       0     368     170 libavutil\mem.o
   2880       0       0    2880     b40 libavutil\pixdesc.o
    464       0       0     464     1d0 libavutil\random_seed.o
   2864       0       0    2864     b30 libavutil\rational.o
    384       0       0     384     180 libavutil\rc4.o
   6048       0       0    6048    17a0 libavutil\sha.o
    928       0       0     928     3a0 libavutil\tree.o
    672       0       0     672     2a0 libavutil\utils.o
   1712       0       0    1712     6b0 libswscale\options.o
  40816       0     128   40944    9ff0 libswscale\rgb2rgb.o
  81840       0      16   81856   13fc0 libswscale\swscale.o
  25296       0       0   25296    62d0 libswscale\utils.o
  24832       0       0   24832    6100 libswscale\yuv2rgb.o
   9936       0       0    9936    26d0 libswscale\x86\yuv2rgb_mmx.o
 966182    6048	 316080 1288310	        Total
hmmm... its not the actual source inside ffmpeg


Jul 28, 2010
#7 fbarch...@chromium.org
libvpx doesn't contain much bss either

c:\usr\local\lib>size libvpx.a
   text    data     bss     dec     hex filename
   2432       0       0    2432     980 vpx_decoder.c.o (ex libvpx.a)
    688       0       0     688     2b0 vpx_decoder_compat.c.o (ex libvpx.a)
   1296       0       0    1296     510 vpx_encoder.c.o (ex libvpx.a)
   1040       0       0    1040     410 vpx_codec.c.o (ex libvpx.a)
   1440       0       0    1440     5a0 vpx_image.c.o (ex libvpx.a)
    432       0       0     432     1b0 vpx_mem.c.o (ex libvpx.a)
   5072       0      96    5168    1430 vpxscale.c.o (ex libvpx.a)
    480       0       0     480     1e0 yv12config.c.o (ex libvpx.a)
   1296       0       0    1296     510 yv12extend.c.o (ex libvpx.a)
    256       0       0     256     100 scalesystemdependant.c.o (ex libvpx.a)
   3296       0       0    3296     ce0 gen_scalers.c.o (ex libvpx.a)
    256       0       0     256     100 segmentation_common.c.o (ex libvpx.a)
   1712       0       0    1712     6b0 alloccommon.c.o (ex libvpx.a)
    592       0       0     592     250 blockd.c.o (ex libvpx.a)
   1440       0       0    1440     5a0 debugmodes.c.o (ex libvpx.a)
   6704     256     208    7168    1c00 entropy.c.o (ex libvpx.a)
   1904       0       0    1904     770 entropymode.c.o (ex libvpx.a)
    128       0       0     128      80 entropymv.c.o (ex libvpx.a)
    736       0       0     736     2e0 extend.c.o (ex libvpx.a)
  11264       0       0   11264    2c00 filter_c.c.o (ex libvpx.a)
   1360       0       0    1360     550 findnearmv.c.o (ex libvpx.a)
    352       0       0     352     160 systemdependent.c.o (ex libvpx.a)
   2048       0       0    2048     800 idctllm.c.o (ex libvpx.a)
   2192       0       0    2192     890 invtrans.c.o (ex libvpx.a)
   8160       0       0    8160    1fe0 loopfilter.c.o (ex libvpx.a)
   6656       0       0    6656    1a00 loopfilter_filters.c.o (ex libvpx.a)
   2400       0       0    2400     960 mbpitch.c.o (ex libvpx.a)
     96       0       0      96      60 modecont.c.o (ex libvpx.a)
   4000       0       0    4000     fa0 modecontext.c.o (ex libvpx.a)
    128       0       0     128      80 predictdc.c.o (ex libvpx.a)
   1360       0       0    1360     550 quant_common.c.o (ex libvpx.a)
   2256       0       0    2256     8d0 recon.c.o (ex libvpx.a)
   9696       0       0    9696    25e0 reconinter.c.o (ex libvpx.a)
   9088       0       0    9088    2380 reconintra.c.o (ex libvpx.a)
   2064       0       0    2064     810 reconintra4x4.c.o (ex libvpx.a)
    224       0       0     224      e0 setupintrarecon.c.o (ex libvpx.a)
     64       0       0      64      40 swapyv12buffer.c.o (ex libvpx.a)
    528       0       0     528     210 textblit.c.o (ex libvpx.a)
   1648       0       0    1648     670 treecoder.c.o (ex libvpx.a)
    736       0       0     736     2e0 x86_systemdependent.c.o (ex libvpx.a)
   2448       0       0    2448     990 vp8_asm_stubs.c.o (ex libvpx.a)
   2944       0       0    2944     b80 loopfilter_x86.c.o (ex libvpx.a)
   6736       0       0    6736    1a50 postproc.c.o (ex libvpx.a)
   9264       0       0    9264    2430 vp8_cx_iface.c.o (ex libvpx.a)
  15936       0       0   15936    3e40 bitstream.c.o (ex libvpx.a)
   2880       0       0    2880     b40 boolhuff.c.o (ex libvpx.a)
   2992       0       0    2992     bb0 dct.c.o (ex libvpx.a)
  13360       0       0   13360    3430 encodeframe.c.o (ex libvpx.a)
   4352       0       0    4352    1100 encodeintra.c.o (ex libvpx.a)
  12272       0       0   12272    2ff0 encodemb.c.o (ex libvpx.a)
   5504       0       0    5504    1580 encodemv.c.o (ex libvpx.a)
   5216       0       0    5216    1460 ethreading.c.o (ex libvpx.a)
  23392       0       0   23392    5b60 firstpass.c.o (ex libvpx.a)
    512       0       0     512     200 csystemdependent.c.o (ex libvpx.a)
  18128       0    1024   19152    4ad0 mcomp.c.o (ex libvpx.a)
    608       0       0     608     260 modecosts.c.o (ex libvpx.a)
  32432       0      16   32448    7ec0 onyx_if.c.o (ex libvpx.a)
  10240       0       0   10240    2800 pickinter.c.o (ex libvpx.a)
   3024       0       0    3024     bd0 picklpf.c.o (ex libvpx.a)
   1040       0       0    1040     410 psnr.c.o (ex libvpx.a)
   1792       0       0    1792     700 quantize.c.o (ex libvpx.a)
  10144       0       0   10144    27a0 ratectrl.c.o (ex libvpx.a)
  24320       0       0   24320    5f00 rdopt.c.o (ex libvpx.a)
  11232       0       0   11232    2be0 sad_c.c.o (ex libvpx.a)
   3952       0       0    3952     f70 tokenize.c.o (ex libvpx.a)
   1504       0       0    1504     5e0 treewriter.c.o (ex libvpx.a)
  10048       0       0   10048    2740 variance_c.c.o (ex libvpx.a)
   1904       0       0    1904     770 x86_csystemdependent.c.o (ex libvpx.a)
   3792       0       0    3792     ed0 variance_mmx.c.o (ex libvpx.a)
   2640       0       0    2640     a50 variance_sse2.c.o (ex libvpx.a)
   2816       0       0    2816     b00 vp8_dx_iface.c.o (ex libvpx.a)
   1504       0       0    1504     5e0 dboolhuff.c.o (ex libvpx.a)
  16384       0      96   16480    4060 decodemv.c.o (ex libvpx.a)
  23008       0       0   23008    59e0 decodframe.c.o (ex libvpx.a)
   5024       0       0    5024    13a0 demode.c.o (ex libvpx.a)
    736       0       0     736     2e0 dequantize.c.o (ex libvpx.a)
   7904      32       0    7936    1f00 detokenize.c.o (ex libvpx.a)
     96       0       0      96      60 dsystemdependent.c.o (ex libvpx.a)
   2144       0      16    2160     870 onyxd_if.c.o (ex libvpx.a)
   5584       0       0    5584    15d0 threading.c.o (ex libvpx.a)
    368       0       0     368     170 x86_dsystemdependent.c.o (ex libvpx.a)
    160       0       0     160      a0 vpx_config.c.o (ex libvpx.a)
    480       0       0     480     1e0 idctllm_mmx.asm.o (ex libvpx.a)
    288       0       0     288     120 iwalsh_mmx.asm.o (ex libvpx.a)
    592       0       0     592     250 recon_mmx.asm.o (ex libvpx.a)
   2192       0       0    2192     890 subpixel_mmx.asm.o (ex libvpx.a)
   3968       0       0    3968     f80 loopfilter_mmx.asm.o (ex libvpx.a)
    512       0       0     512     200 recon_sse2.asm.o (ex libvpx.a)
   2704       0       0    2704     a90 subpixel_sse2.asm.o (ex libvpx.a)
   5424       0       0    5424    1530 loopfilter_sse2.asm.o (ex libvpx.a)
    256       0       0     256     100 iwalsh_sse2.asm.o (ex libvpx.a)
   1744       0       0    1744     6d0 variance_impl_mmx.asm.o (ex libvpx.a)
    624       0       0     624     270 sad_mmx.asm.o (ex libvpx.a)
   1776       0       0    1776     6f0 dct_mmx.asm.o (ex libvpx.a)
    960       0       0     960     3c0 subtract_mmx.asm.o (ex libvpx.a)
   1824       0       0    1824     720 variance_impl_sse2.asm.o (ex libvpx.a)
    464       0       0     464     1d0 sad_sse2.asm.o (ex libvpx.a)
    608       0       0     608     260 dct_sse2.asm.o (ex libvpx.a)
    224       0       0     224      e0 fwalsh_sse2.asm.o (ex libvpx.a)
    512       0       0     512     200 quantize_sse2.asm.o (ex libvpx.a)
   5616       0       0    5616    15f0 sad_sse3.asm.o (ex libvpx.a)
  25632       0       0   25632    6420 sad_ssse3.asm.o (ex libvpx.a)
    832       0       0     832     340 quantize_mmx.asm.o (ex libvpx.a)
    656       0       0     656     290 encodeopt.asm.o (ex libvpx.a)
    848       0       0     848     350 dequantize_mmx.asm.o (ex libvpx.a)
     16       0       0      16      10 emms.asm.o (ex libvpx.a)
      0       0       0       0       0 x86_abi_support.asm.o (ex libvpx.a)
hmmm.  what other code gets linked in?
Somewhere the final dll gets quite a bit of bss.
depends.exe doesn't show any usual dependencies.

Jul 28, 2010
#8 fbarch...@chromium.org
The last public built ffmpeg I got (a little old) doesn't use much bss

c:\ffmpeg23465\bin>size ffmpeg.exe
   text    data     bss     dec     hex filename
12524743         172568 6156624 18853935        11fb02f ffmpeg.exe

Removing libvpx and building just ogg, like Chrome5 had, I get these DLL's
699,904 avcodec-52.dll
113,152 avformat-52.dll
 84,480 avutil-50.dll
 905,728 bytes

Y:\dll\ogg>size avcodec-52.dll
   text    data     bss     dec     hex filename
 691892    4892  302528  999312   f3f90 avcodec-52.dll

So it is pointing to webm.  Although it could be something that webm uses and links in.  The only difference in the configuration is
 --enable-libvpx --enable-decoder=libvpx --enable-demuxer=matroska --extra-cflags='-I../../usr/local/include'

This is the actual link line that generates the dll

gcc-sjlj -shared -Wl,--output-def,libavformat/avformat-52.def -Wl,--out-implib,libavformat/libavformat.dll.a -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base -Wl,--version-script,libavformat/libavformat.ver -L"/c/ff/ffmpeg-mt"/libavcodec -L"/c/ff/ffmpeg-mt"/libavdevice -L"/c/ff/ffmpeg-mt"/libavfilter -L"/c/ff/ffmpeg-mt"/libavformat -L"/c/ff/ffmpeg-mt"/libavutil -L"/c/ff/ffmpeg-mt"/libpostproc -L"/c/ff/ffmpeg-mt"/libswscale -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libpostproc -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libswscale -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libavfilter -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libavdevice -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libavformat -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libavcodec -Wl,-rpath-link,"/c/ff/ffmpeg-mt"/libavutil -Wl,-Bsymbolic -o libavformat/avformat-52.dll libavformat/allformats.o libavformat/avio.o libavformat/aviobuf.o libavformat/cutils.o libavformat/isom.o libavformat/matroska.o libavformat/matroskadec.o libavformat/metadata.o libavformat/metadata_compat.o libavformat/oggdec.o libavformat/oggparseogm.o libavformat/oggparseskeleton.o libavformat/oggparsetheora.o libavformat/oggparsevorbis.o libavformat/options.o libavformat/os_support.o libavformat/riff.o libavformat/rm.o libavformat/rmdec.o libavformat/sdp.o libavformat/seek.o libavformat/utils.o libavformat/vorbiscomment.o -lavcodec -lavutil -lvpx -lvpx -lm -lpthreadGC2 -lws2_32 -lpsapi  

Jul 28, 2010
#9 fbarch...@chromium.org
Its something about libvpx (webm)
Doing an ffmpeg configure with ONLY the libvpx decoder we get the following
744,960 avcodec-52.dll
 99,328 avformat-52.dll
 84,480 avutil-50.dll
 936,960 bytes

Y:\dll\libvpx>size avcodec-52.dll
   text    data     bss     dec     hex filename
 737441    4628 1583696 2325765  237d05 avcodec-52.dll

libvpx and ffmpeg are built with msys on Windows.

Jul 28, 2010
#10 fgalli...@chromium.org
So it looks like the offending variable is vp8_an. It was used by the encoder. It actually looks like it is not used anymore and the reason why the VS build does not have a big .bss is because the linker is smarter in vs over msys.

In file postproc.c ~line 330

//Notes: It is better to change CHAR to unsigned or signed to
//avoid error on ARM platform.
char vp8_an[8][64][3072];
int vp8_cd[8][64];

I'm going to submit a patch to libvpx to remove the variable.

Jul 28, 2010
#11 cmp@chromium.org
@fgalligan, An earlier message in this thread indicated the expectations for vm_peak_r need to be updated, though now it sounds like you're attempting to fix this directly.  That's great.  Ping me if there's a reversal of decision and expectations need to be updated.
Cc: ch...@chromium.org
Jul 28, 2010
#12 scherkus@chromium.org
FYI fbarchard your latest attempt (r54053) might be causing the same issue again:
http://build.chromium.org/buildbot/waterfall/builders/XP%20Perf%20(1)/builds/9121

PERF_REGRESS: vm_peak_r/vm_pk_r IO_b: 43.4k (42.8k) IO_b_extcs1: 43.3k IO_op_b: 49.2k (53.3k) IO_op_b_extcs1: 54.7k IO_op_r: 28.3k (28.1k) IO_op_r_extcs1: 28.0k IO_r: 7.84k (7.54k) IO_r_extcs1: 7.68k t: 1.09k (1.08k) t_extcs1: 1.09k vm_pk_b: 15.0M (14.0M) vm_pk_b_extcs1: 16.3M vm_pk_r: 70.5M (83.7M) vm_pk_r_extcs1: 70.2M vm_spk_r: 70.5M (83.7M) vm_spk_r_extcs1: 70.2M ws_pk_b: 31.1M (28.9M) ws_pk_b_extcs1: 32.3M ws_pk_r: 65.8M (79.6M) ws_pk_r_extcs1: 65.9M ws_spk_r: 65.8M (79.6M) ws_spk_r_extcs1: 65.9M


vm_pk_r is down 0.1M to 70.5M, but looks like its still hitting that threshold

It sounds like the proper fix requires updating libvpx as opposed to disabling the encoder check in FFmpeg.

Jul 29, 2010
#13 fgalli...@chromium.org
@chase, fbarchard removed the vp8 encoder, which had the offending 1.6 Meg global, from the windows FFmpeg build here http://crrev.com/54086

It looks like the build bot is ok now:
http://build.chromium.org/buildbot/waterfall/builders/XP%20Perf%20(1)/builds/9125

I also fixed the issue in libvpx in case we need to add libvpx with the encoder again:
https://review.webmproject.org/#change,360

Jul 29, 2010
#14 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=54042 

------------------------------------------------------------------------
r54042 | fbarchard@chromium.org | 2010-07-28 15:29:53 -0700 (Wed, 28 Jul 2010) | 5 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/README.chromium?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/01_static_pthread_O2.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/02_mov_dref_looping.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/03_mpeg4_video_to_elementary_stream.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/04_vc1_bsfs.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/05_respect_flac_dirac_configure.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/06_remove_decode_on_config_no_svq3.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/11_mkv_buffer_overflow.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/12_ogg_seek_to_zero.patch?r1=54042&r2=54041
   A http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/to_upstream/13_libvpx_check_decoder_only.patch
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/ugly/07_get_bits_overrun.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/ugly/08_enforce_theora_oob.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/ugly/09_enforce_vorbis_oob_divzero.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/ugly/10_aac_oob_read.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/patches/ugly/11_ogg_seek_first_frame.patch?r1=54042&r2=54041
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/source/patched-ffmpeg-mt/configure?r1=54042&r2=54041

ffmpeg configured with webm decode only to avoid postproc that pulls in unused data
BUG=50507,50533
TEST=xp perf should pass

Review URL: http://codereview.chromium.org/3066011
------------------------------------------------------------------------

Jul 29, 2010
#15 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=54050 

------------------------------------------------------------------------
r54050 | fbarchard@chromium.org | 2010-07-28 15:42:14 -0700 (Wed, 28 Jul 2010) | 5 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/binaries/win/avcodec-52.dll?r1=54050&r2=54049
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/binaries/win/avformat-52.dll?r1=54050&r2=54049
   M http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/ffmpeg/binaries/win/avutil-50.dll?r1=54050&r2=54049

ffmpeg binaries reduced in size
BUG=50507
TEST=XP Perf should pass

Review URL: http://codereview.chromium.org/3051021
------------------------------------------------------------------------

Jul 29, 2010
#17 evan@chromium.org
Thanks for your diligence in tracking this down!
Status: Fixed
Aug 2, 2010
#18 bugdroid1@gmail.com
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=54517 

------------------------------------------------------------------------
r54517 | scherkus@chromium.org | 2010-08-01 23:44:35 -0700 (Sun, 01 Aug 2010) | 9 lines
Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/472/src/DEPS?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/base/mock_ffmpeg.cc?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/base/mock_ffmpeg.h?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/ffmpeg/ffmpeg_common.h?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/filters/ffmpeg_glue.cc?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/test/ffmpeg_tests/ffmpeg_tests.cc?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/tools/media_bench/media_bench.cc?r1=54517&r2=54516
   M http://src.chromium.org/viewvc/chrome/branches/472/src/media/tools/omx_test/omx_test.cc?r1=54517&r2=54516

Merge 54053 - ffmpeg roll for chromium source and windows binaries
Includes fix for XP Perf by reducing webm library size by 1.6 MB
BUG=48037,50507
TEST=XP Perf and layout tests should pass

Review URL: http://codereview.chromium.org/3030024

TBR=fbarchard@chromium.org
Review URL: http://codereview.chromium.org/3007022
------------------------------------------------------------------------

Oct 12, 2012
#19 bugdroid1@chromium.org
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Labels: Restrict-AddIssueComment-Commit
Mar 10, 2013
#20 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Area-WebKit -Mstone-6 -Feature-Media Cr-Content Cr-Internals-Media M-6
Mar 13, 2013
#21 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Apr 5, 2013
#22 bugdroid1@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Content Cr-Blink
Sign in to add a comment

Powered by Google Project Hosting