[PATCH 0/3] Coldify, constify, purify (function attributes)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's a gcc option -Wsuggest-attribute that, as it says, suggests some
function attributes to provide some hints and allowing more
optimizations.

Debug build

   text    data     bss     dec     hex filename
1514058  146768   27496 1688322  19c302 pre/btrfs.ko
1512603  146736   27496 1686835  19bd33 post/btrfs.ko
DELTA: -1455

Release build

   text    data     bss     dec     hex filename
1079288   17316   14912 1111516  10f5dc pre/btrfs.ko
1078138   17316   14912 1110366  10f15e post/btrfs.ko
DELTA: -1150

David Sterba (3):
  btrfs: add __cold attribute to more functions
  btrfs: add const function attribute
  btrfs: add __pure attribute to functions

 fs/btrfs/async-thread.c | 6 ++----
 fs/btrfs/async-thread.h | 4 ++--
 fs/btrfs/ctree.c        | 2 +-
 fs/btrfs/ctree.h        | 6 +++---
 fs/btrfs/dev-replace.c  | 2 +-
 fs/btrfs/dev-replace.h  | 2 +-
 fs/btrfs/disk-io.c      | 4 ++--
 fs/btrfs/disk-io.h      | 4 ++--
 fs/btrfs/ioctl.c        | 2 +-
 fs/btrfs/space-info.c   | 2 +-
 fs/btrfs/space-info.h   | 2 +-
 fs/btrfs/super.c        | 4 ++--
 fs/btrfs/volumes.c      | 4 ++--
 fs/btrfs/volumes.h      | 2 +-
 14 files changed, 22 insertions(+), 24 deletions(-)

-- 
2.23.0




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux