md = mask_bits[bd];
}
/* called once from inflate_get_next_window */
-static int inflate_codes(STATE_PARAM_ONLY)
+static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
{
unsigned e; /* table entry flag/number of extra bits */
huft_t *t; /* pointer to table entry */
receive - 834 +834 loss
855 bytes saved in total.
+
+scripts/mkdiff_obj_bloat may be useful to automate this process: run
+"scripts/mkdiff_obj_bloat NORMALLY_BUILT_TREE FORCED_NOINLINE_TREE"
+and select modules which shrank.
* Returns the line number which matches, or 0 if there was no match
* with an error printed.
*/
-static int searchLines(const char *str, int num1, int num2)
+static NOINLINE int searchLines(const char *str, int num1, int num2)
{
const LINE *lp;
int len;
}
//----- Synchronize the cursor to Dot --------------------------
-static void sync_cursor(char *d, int *row, int *col)
+static NOINLINE void sync_cursor(char *d, int *row, int *col)
{
char *beg_cur; // begin and end of "d" line
char *tp;
}
/* update_utmp - update our utmp entry */
-static void update_utmp(const char *line, char *fakehost)
+static NOINLINE void update_utmp(const char *line, char *fakehost)
{
struct utmp ut;
struct utmp *utp;
printf("qlen %d", ifr.ifr_qlen);
}
-static int print_linkinfo(const struct nlmsghdr *n)
+static NOINLINE int print_linkinfo(const struct nlmsghdr *n)
{
struct ifinfomsg *ifi = NLMSG_DATA(n);
struct rtattr * tb[IFLA_MAX+1];
/* Add or delete a route, depending on action. */
-static void INET_setroute(int action, char **args)
+static NOINLINE void INET_setroute(int action, char **args)
{
struct rtentry rt;
const char *netmask = NULL;
#if ENABLE_FEATURE_IPV6
-static void INET6_setroute(int action, char **args)
+static NOINLINE void INET6_setroute(int action, char **args)
{
struct sockaddr_in6 sa6;
struct in6_rtmsg rt;
OPT_2 = (1 << 20) * ENABLE_CHPST,
};
-static void edir(const char *directory_name)
+static NOINLINE void edir(const char *directory_name)
{
int wdir;
DIR *dir;
--- /dev/null
+#!/bin/sh
+
+filter() {
+ # sed removes " address: " prefixes which mess up diff
+ sed $'s/^\\(\t*\\)[ ]*[0-9a-f][0-9a-f]*:[ \t]*/\\1/' \
+ | sed 's/__GI_//g'
+}
+
+test -d "$1" || exit 1
+test -d "$2" || exit 1
+
+{
+ (
+ cd "$1" || exit 1
+ find -name '*.o' -o -name '*.os' # -o -name '*.so'
+ )
+ (
+ cd "$2" || exit 1
+ find -name '*.o' -o -name '*.os' # -o -name '*.so'
+ )
+} | sed 's:^\./::' | sort | uniq | \
+tee LST | \
+(
+IFS=''
+while read -r oname; do
+ if ! test -f "$1/$oname"; then
+ echo "Only $2/$oname"
+ continue
+ fi
+ if ! test -f "$2/$oname"; then
+ echo "Only $1/$oname"
+ continue
+ fi
+ diff -q -- "$1/$oname" "$2/$oname" >/dev/null && continue
+ (cd "$1"; objdump -dr "$oname" | filter >"$oname.disasm")
+ (cd "$2"; objdump -dr "$oname" | filter >"$oname.disasm")
+ diff -u "$1/$oname.disasm" "$2/$oname.disasm"
+done
+)
--- /dev/null
+#!/bin/sh
+
+test -d "$1" || exit 1
+test -d "$2" || exit 1
+
+{
+ (
+ cd "$1" || exit 1
+ find -name '*.o' -o -name '*.os' # -o -name '*.so'
+ )
+ (
+ cd "$2" || exit 1
+ find -name '*.o' -o -name '*.os' # -o -name '*.so'
+ )
+} | sed 's:^\./::' | sort | uniq | \
+tee LST | \
+(
+IFS=''
+while read -r oname; do
+ if ! test -f "$1/$oname"; then
+ echo "Only $2/$oname"
+ continue
+ fi
+ if ! test -f "$2/$oname"; then
+ echo "Only $1/$oname"
+ continue
+ fi
+ $1/scripts/bloat-o-meter $1/$oname $2/$oname | grep 'otal: 0 byte' >/dev/null && continue
+ $1/scripts/bloat-o-meter $1/$oname $2/$oname
+ size $1/$oname $2/$oname
+ echo
+done
+)
* ash -c 'echo ${#$1}' name:'$=1'
* ash -c 'echo ${#1#}' name:'1=#'
*/
-static ssize_t
+static NOINLINE ssize_t
varvalue(char *name, int varflags, int flags, struct strlist *var_str_list)
{
int num;
}
-static void do_sem(void)
+static NOINLINE void do_sem(void)
{
int maxid, semid, id;
struct semid_ds semary;
}
-static void do_msg(void)
+static NOINLINE void do_msg(void)
{
int maxid, msqid, id;
struct msqid_ds msgque;
static time_t rtc_time;
-static bool may_wakeup(const char *rtcname)
+static NOINLINE bool may_wakeup(const char *rtcname)
{
ssize_t ret;
char buf[128];
return strncmp(buf, "enabled\n", 8) == 0;
}
-static void setup_alarm(int fd, time_t *wakeup)
+static NOINLINE void setup_alarm(int fd, time_t *wakeup)
{
struct tm *tm;
struct linux_rtc_wkalrm wake;