[root@ ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
git とgcc install
[root@ ~]# yum install -y git gcc
gitはダウンロード、gccはFFSBのコンパイルに使用します。
FFSB-Prime install
As the original project seems dead,
FFSB本家が死んでいるといってますが、このFFSB-Primeも現時点で7年更新されていない模様
さておきダウンロードして
[root@ ~]# git clone https://github.com/FFSB-Prime/ffsb.git
Cloning into 'ffsb'...
remote: Enumerating objects: 91, done.
remote: Total 91 (delta 0), reused 0 (delta 0), pack-reused 91
Unpacking objects: 100% (91/91), done.
[root@ ~]# cd ffsb/
[root@ ~]# ./configure && make -j 4
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for AIX... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for main in -lm... yes
checking for main in -lpthread... yes
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdint.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/limits.h usability... no
checking sys/limits.h presence... no
checking for sys/limits.h... no
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking for system... yes
checking for gettimeofday... yes
checking for mkdir... yes
checking for strerror... yes
checking for open64... yes
checking for stat64... yes
checking for fseeko64... yes
checking for lrand48_r... yes
checking for srand48_r... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
cd . && /bin/sh /tmp/ffsb/missing --run aclocal-1.10
/tmp/ffsb/missing: line 46: aclocal-1.10: command not found
WARNING: `aclocal-1.10' is missing on your system. You should only need it if
you modified `acinclude.m4' or `configure.in'. You might want
to install the `Automake' and `Perl' packages. Grab them from
any GNU archive site.
cd . && /bin/sh /tmp/ffsb/missing --run automake-1.10 --gnu
/tmp/ffsb/missing: line 46: automake-1.10: command not found
WARNING: `automake-1.10' is missing on your system. You should only need it if
you modified `Makefile.am', `acinclude.m4' or `configure.in'.
You might want to install the `Automake' and `Perl' packages.
Grab them from any GNU archive site.
cd . && /bin/sh /tmp/ffsb/missing --run autoconf
/tmp/ffsb/missing: line 46: autoconf: command not found
WARNING: `autoconf' is missing on your system. You should only need it if
you modified `configure.in'. You might want to install the
`Autoconf' and `GNU m4' packages. Grab them from any GNU
archive site.
/bin/sh ./config.status --recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure --no-create --no-recursion
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for AIX... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for main in -lm... yes
checking for main in -lpthread... yes
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdint.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/limits.h usability... no
checking sys/limits.h presence... no
checking for sys/limits.h... no
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking for system... yes
checking for gettimeofday... yes
checking for mkdir... yes
checking for strerror... yes
checking for open64... yes
checking for stat64... yes
checking for fseeko64... yes
checking for lrand48_r... yes
checking for srand48_r... yes
configure: creating ./config.status
/bin/sh ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing default commands
cd . && /bin/sh /tmp/ffsb/missing --run autoheader
/tmp/ffsb/missing: line 46: autoheader: command not found
WARNING: `autoheader' is missing on your system. You should only need it if
you modified `acconfig.h' or `configure.in'. You might want
to install the `Autoconf' and `GNU m4' packages. Grab them
from any GNU archive site.
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make all-am
make[1]: Entering directory `/tmp/ffsb'
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT fileops.o -MD -MP -MF .deps/fileops.Tpo -c -o fileops.o fileops.c
mv -f .deps/fileops.Tpo .deps/fileops.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT rand.o -MD -MP -MF .deps/rand.Tpo -c -o rand.o rand.c
mv -f .deps/rand.Tpo .deps/rand.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT fh.o -MD -MP -MF .deps/fh.Tpo -c -o fh.o fh.c
mv -f .deps/fh.Tpo .deps/fh.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT filelist.o -MD -MP -MF .deps/filelist.Tpo -c -o filelist.o filelist.c
mv -f .deps/filelist.Tpo .deps/filelist.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT metaops.o -MD -MP -MF .deps/metaops.Tpo -c -o metaops.o metaops.c
mv -f .deps/metaops.Tpo .deps/metaops.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT rwlock.o -MD -MP -MF .deps/rwlock.Tpo -c -o rwlock.o rwlock.c
mv -f .deps/rwlock.Tpo .deps/rwlock.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT cirlist.o -MD -MP -MF .deps/cirlist.Tpo -c -o cirlist.o cirlist.c
mv -f .deps/cirlist.Tpo .deps/cirlist.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT rbt.o -MD -MP -MF .deps/rbt.Tpo -c -o rbt.o rbt.c
mv -f .deps/rbt.Tpo .deps/rbt.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_tg.o -MD -MP -MF .deps/ffsb_tg.Tpo -c -o ffsb_tg.o ffsb_tg.c
mv -f .deps/ffsb_tg.Tpo .deps/ffsb_tg.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_fs.o -MD -MP -MF .deps/ffsb_fs.Tpo -c -o ffsb_fs.o ffsb_fs.c
mv -f .deps/ffsb_fs.Tpo .deps/ffsb_fs.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_thread.o -MD -MP -MF .deps/ffsb_thread.Tpo -c -o ffsb_thread.o ffsb_thread.c
mv -f .deps/ffsb_thread.Tpo .deps/ffsb_thread.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_op.o -MD -MP -MF .deps/ffsb_op.Tpo -c -o ffsb_op.o ffsb_op.c
mv -f .deps/ffsb_op.Tpo .deps/ffsb_op.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT parser.o -MD -MP -MF .deps/parser.Tpo -c -o parser.o parser.c
In file included from parser.h:22:0,
from parser.c:25:
parser.c: In function ‘init_filesys’:
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:39:13: note: in expansion of macro ‘list_entry’
for (pos = list_entry((head)->next, typeof(*pos), member); \
^
parser.c:934:3: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list, &list_head->list, list)
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:41:13: note: in expansion of macro ‘list_entry’
pos = list_entry(pos->member.next, typeof(*pos), member))
^
parser.c:934:3: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list, &list_head->list, list)
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:39:13: note: in expansion of macro ‘list_entry’
for (pos = list_entry((head)->next, typeof(*pos), member); \
^
parser.c:941:3: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list, &list_head->list, list) {
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:41:13: note: in expansion of macro ‘list_entry’
pos = list_entry(pos->member.next, typeof(*pos), member))
^
parser.c:941:3: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list, &list_head->list, list) {
^
parser.c: In function ‘init_tg_stats’:
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:39:13: note: in expansion of macro ‘list_entry’
for (pos = list_entry((head)->next, typeof(*pos), member); \
^
parser.c:971:6: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list,
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:41:13: note: in expansion of macro ‘list_entry’
pos = list_entry(pos->member.next, typeof(*pos), member))
^
parser.c:971:6: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list,
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:39:13: note: in expansion of macro ‘list_entry’
for (pos = list_entry((head)->next, typeof(*pos), member); \
^
parser.c:980:6: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list,
^
list.h:29:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define offsetof(type, member) ((int) &((type *)0)->member)
^
list.h:33:28: note: in expansion of macro ‘offsetof’
(type *)((char *)__mptr - offsetof(type, member)); })
^
list.h:36:2: note: in expansion of macro ‘container_of’
container_of(ptr, type, member)
^
list.h:41:13: note: in expansion of macro ‘list_entry’
pos = list_entry(pos->member.next, typeof(*pos), member))
^
parser.c:980:6: note: in expansion of macro ‘list_for_each_entry’
list_for_each_entry(tmp_list,
^
mv -f .deps/parser.Tpo .deps/parser.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_fc.o -MD -MP -MF .deps/ffsb_fc.Tpo -c -o ffsb_fc.o ffsb_fc.c
mv -f .deps/ffsb_fc.Tpo .deps/ffsb_fc.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT ffsb_stats.o -MD -MP -MF .deps/ffsb_stats.Tpo -c -o ffsb_stats.o ffsb_stats.c
mv -f .deps/ffsb_stats.Tpo .deps/ffsb_stats.Po
gcc -DHAVE_CONFIG_H -I. -D_GNU_SOURCE -g -O2 -D_REENTRANT -MT list.o -MD -MP -MF .deps/list.Tpo -c -o list.o list.c
mv -f .deps/list.Tpo .deps/list.Po
gcc -D_GNU_SOURCE -g -O2 -D_REENTRANT -o ffsb fileops.o rand.o main.o fh.o filelist.o metaops.o rwlock.o cirlist.o rbt.o ffsb_tg.o ffsb_fs.o ffsb_thread.o ffsb_op.o util.o parser.o ffsb_fc.o ffsb_stats.o list.o -lpthread -lm
make[1]: Leaving directory `/tmp/ffsb'
confファイルダウンロード
同じGithubにあるサンプルを拝借
[root@ ~]# wget https://raw.githubusercontent.com/FFSB-Prime/ffsb/master/examples/profile_everything
これをそのまま実行すればベンチマーク自体はできる。
オプション等についてはお勉強中。
ベンチマークスタート
[root@ ~]# ffsb profile_everything