https://github.com/torvalds/linux
Revision f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC, committed by Linus Torvalds on 04 July 2009, 16:46:13 UTC
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  sound: do not set DEVNAME for OSS devices
  ALSA: hda - Add sanity check in PCM open callback
  ALSA: hda - Call snd_pcm_lib_hw_rates() again after codec open callback
  ALSA: hda - Avoid invalid formats and rates with shared SPDIF
  ALSA: hda - Improve ASUS eeePC 1000 mixer
  ALSA: hda - Add GPIO1 control at muting with HP laptops
  ALSA: usx2y - reparent sound device
  ALSA: snd_usb_caiaq: reparent sound device
  sound: virtuoso: fix Xonar D1/DX silence after resume
  ASoC: Only disable pxa2xx-i2s clocks if we enabled them
  ALSA: hda - Add quirk for HP 6930p
  ALSA: hda - Add missing static to patch_ca0110()
  ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
  ASoC: remove BROKEN from Efika and pcm030 fabric drivers
  ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
2 parent s 29f3177 + 7ce1695
Raw File
Tip revision: f1a745710f001e8c2eec6d525396083e1f4c389a authored by Linus Torvalds on 04 July 2009, 16:46:13 UTC
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Tip revision: f1a7457
bloat-o-meter
#!/usr/bin/python
#
# Copyright 2004 Matt Mackall <mpm@selenic.com>
#
# inspired by perl Bloat-O-Meter (c) 1997 by Andi Kleen
#
# This software may be used and distributed according to the terms
# of the GNU General Public License, incorporated herein by reference.

import sys, os, re

if len(sys.argv) != 3:
    sys.stderr.write("usage: %s file1 file2\n" % sys.argv[0])
    sys.exit(-1)

def getsizes(file):
    sym = {}
    for l in os.popen("nm --size-sort " + file).readlines():
        size, type, name = l[:-1].split()
        if type in "tTdDbB":
            # function names begin with '.' on 64-bit powerpc
            if "." in name[1:]: name = "static." + name.split(".")[0]
            sym[name] = sym.get(name, 0) + int(size, 16)
    return sym

old = getsizes(sys.argv[1])
new = getsizes(sys.argv[2])
grow, shrink, add, remove, up, down = 0, 0, 0, 0, 0, 0
delta, common = [], {}

for a in old:
    if a in new:
        common[a] = 1

for name in old:
    if name not in common:
        remove += 1
        down += old[name]
        delta.append((-old[name], name))

for name in new:
    if name not in common:
        add += 1
        up += new[name]
        delta.append((new[name], name))

for name in common:
        d = new.get(name, 0) - old.get(name, 0)
        if d>0: grow, up = grow+1, up+d
        if d<0: shrink, down = shrink+1, down-d
        delta.append((d, name))

delta.sort()
delta.reverse()

print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
      (add, remove, grow, shrink, up, -down, up-down)
print "%-40s %7s %7s %+7s" % ("function", "old", "new", "delta")
for d, n in delta:
    if d: print "%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d)
back to top