source: mainline/boot/Makefile.common@ 67bcd81

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 67bcd81 was 3fea752, checked in by Vojtech Horky <vojtech.horky@…>, 7 years ago

Merge changes to benchmarking tool (PR #151)

This merges refactoring and other changes to the perf/hbench tool.

The changes include:

  • Factor out all the duplicate code in individual benchmarks into a common harness
  • Properly compute average throughput
    • Added an awful function to compute square root until proper implementation is available (for the precision we need it is quite sufficient) [sqrt is needed to compute standard deviation]
  • Added option to dump data to CSV for further processing
  • Added option to specify minimal duration of a loop and number of runs to execute.
  • Added simple benchmark for fibril mutexes
  • Merged benchmarks from bnchmark application and removed it
    • These benchmarks are FS-related and IMHO are quite badly designed (they really stress only the block cache and not the FS on top of it; but still they might be useful as IPC benchmark of large data volumes)
  • Renamed perf to hbench to stress that it is a benchmarking application rather than a generic performance measurement tool (compared to perf in GNU/Linux)
  • Extended documentation a little bit
  • Added function for measuring wall-clock time (internally pass-through to uptime but available for other applications as the right API for this in HelenOS)
  • Property mode set to 100644
File size: 6.0 KB
RevLine 
[81235588]1#
[4872160]2# Copyright (c) 2006 Martin Decky
[81235588]3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8#
9# - Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# - Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution.
14# - The name of the author may not be used to endorse or promote products
15# derived from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28
[4872160]29## Configuration
30#
31
32ROOT_PATH = ..
33
34VERSION_DEF = $(ROOT_PATH)/version
35
36COMMON_MAKEFILE = $(ROOT_PATH)/Makefile.common
37COMMON_HEADER = $(ROOT_PATH)/common.h
38
39CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
40CONFIG_HEADER = $(ROOT_PATH)/config.h
41
42-include $(VERSION_DEF)
43-include $(COMMON_MAKEFILE)
44-include $(CONFIG_MAKEFILE)
45
46KERNEL_PATH = $(ROOT_PATH)/kernel
47USPACE_PATH = $(ROOT_PATH)/uspace
48DIST_PATH = $(USPACE_PATH)/dist
[53238ba]49DIST_OVERLAY_PATH = $(USPACE_PATH)/overlay
[4872160]50TOOLS_PATH = $(ROOT_PATH)/tools
[a79d88d]51DRVS_PATH = drv
[4872160]52
[4646710]53MKARRAY = $(TOOLS_PATH)/mkarray.py
[4872160]54MKFAT = $(TOOLS_PATH)/mkfat.py
[d06c4ae]55MKEXT4 = $(TOOLS_PATH)/mkext4.py
[928d983]56MKUIMAGE = $(TOOLS_PATH)/mkuimage.py
[4872160]57
[7f881cd8]58ifeq ($(PRECHECK),y)
59 JOBFILE = $(TOOLS_PATH)/jobfile.py
[95d45482]60 # NOTE: You must not change the order of arguments.
[7f881cd8]61 CC_JOB = $(JOBFILE) $(JOB) $(CC) $< -o $@
62else
63 CC_JOB = $(CC) $< -o $@
64endif
[4872160]65
66DISTROOT = distroot
[81235588]67INITRD = initrd
68
69INIT_TASKS = \
[4872160]70 $(USPACE_PATH)/srv/ns/ns \
71 $(USPACE_PATH)/srv/loader/loader \
72 $(USPACE_PATH)/app/init/init \
[32d96e1]73 $(USPACE_PATH)/srv/locsrv/locsrv \
[4872160]74 $(USPACE_PATH)/srv/bd/rd/rd \
[1f2dd20]75 $(USPACE_PATH)/srv/vfs/vfs \
76 $(USPACE_PATH)/srv/logger/logger
[14f1db0]77
[81235588]78ifeq ($(RDFMT),tmpfs)
[4872160]79 INIT_TASKS += $(USPACE_PATH)/srv/fs/tmpfs/tmpfs
[81235588]80endif
[14f1db0]81
[81235588]82ifeq ($(RDFMT),fat)
[4872160]83 INIT_TASKS += $(USPACE_PATH)/srv/fs/fat/fat
[81235588]84endif
85
[d06c4ae]86ifeq ($(RDFMT),ext4fs)
87 INIT_TASKS += $(USPACE_PATH)/srv/fs/ext4fs/ext4fs
[cc1a727]88endif
89
[fa9616b4]90RD_SRVS_ESSENTIAL = \
[8fefd8b]91 hid/input \
92 hid/output \
93 hid/console \
94 devman \
95 fs/locfs \
96 klog
[fa9616b4]97
[60c96cf]98ifeq ($(CONFIG_FB), y)
99 RD_SRVS_ESSENTIAL += \
100 hid/compositor
101endif
102
[fa9616b4]103RD_SRVS_NON_ESSENTIAL = \
[8fefd8b]104 bd/file_bd \
105 bd/sata_bd \
106 bd/vbd \
107 clipboard \
108 fs/tmpfs \
109 fs/fat \
110 fs/mfs \
111 fs/cdfs \
112 fs/exfat \
113 fs/udf \
114 fs/ext4fs \
115 hid/remcons \
116 hid/isdv4_tablet \
117 hid/rfb \
118 net/dhcp \
119 net/dnsrsrv \
120 net/ethip \
121 net/inetsrv \
122 net/loopip \
123 net/nconfsrv \
124 net/slip \
125 net/tcp \
126 net/udp \
127 taskmon \
128 test/chardev-test \
[1edd6d0]129 test/ipc-test \
[8fefd8b]130 volsrv
[5203e256]131
[bd250b0f]132RD_DRVS_ESSENTIAL = \
[2a37b9f]133 root/root \
134 root/virt \
[81ee1009]135 fb/kfb
[bd250b0f]136
137RD_DRVS_NON_ESSENTIAL = \
[5203e256]138 test/test1 \
139 test/test2 \
[00d7e1b]140 test/test3 \
[c4be33a]141 nic/ne2k \
[f0b74b2]142 nic/e1k \
[9904eb90]143 nic/rtl8139 \
[90782c36]144 nic/rtl8169 \
[8a64320e]145 nic/ar9271 \
[6413967]146 nic/virtio-net \
[9904eb90]147 block/ahci
[c47e1a8]148
[5203e256]149RD_DRV_CFG =
[14f1db0]150
[8a64320e]151RD_DRVS_FW_NON_ESSENTIAL = \
152 nic/ar9271
[864762a]153
[7fb3f1c]154RD_LIBS =
155
[a8010272]156ifeq ($(CONFIG_DEVEL_FILES), y)
157 RD_LIBS += \
[954c024]158 $(USPACE_PATH)/lib/c/libc.a
[a8010272]159endif
160
[ec3e2ed0]161ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
[5b72635]162 RD_LIBS += \
[e2e9a8a]163 $(USPACE_PATH)/lib/c/libc.so.0 \
[9182e86f]164 $(USPACE_PATH)/lib/math/libmath.so.0 \
165 $(USPACE_PATH)/lib/dltest/libdltest.so.0
[04803bf]166endif
167
[60c96cf]168RD_APPS_ESSENTIAL = \
169 bdsh \
170 getterm \
171 kio
172
173ifeq ($(CONFIG_FB), y)
174 RD_APPS_ESSENTIAL += \
175 vlaunch \
176 vterm
177endif
[fa9616b4]178
179RD_APPS_NON_ESSENTIAL = \
[0e8c158]180 barber \
181 bithenge \
182 blkdump \
183 contacts \
184 corecfg \
185 cpptest \
186 devctl \
187 dnscfg \
188 dnsres \
189 download \
190 edit \
191 fdisk \
192 gunzip \
[fe656783]193 hbench \
[0e8c158]194 inet \
195 kill \
196 killall \
197 loc \
[10b21a1b]198 lprint \
[0e8c158]199 mixerctl \
200 modplay \
201 logset \
202 mkfat \
203 mkexfat \
204 mkext4 \
205 mkmfs \
206 nic \
207 sbi \
208 sportdmp \
209 redir \
210 taskdump \
211 tester \
212 testread \
[209cd41]213 testrunner \
[0e8c158]214 testwrit \
215 tetris \
216 tmon \
217 trace \
218 netecho \
219 nterm \
[7acd787]220 pci \
[0e8c158]221 ping \
222 pkg \
223 stats \
224 sysinfo \
225 sysinst \
226 top \
227 untar \
228 usbinfo \
229 vol \
230 vuhid \
231 mkbd \
232 websrv \
233 date \
234 vcalc \
235 vdemo \
236 viewer \
237 df \
238 fontviewer \
239 wifi_supplicant
[4872160]240
[9182e86f]241ifeq ($(CONFIG_BUILD_SHARED_LIBS), y)
[0e8c158]242 RD_APPS_NON_ESSENTIAL += dltest dltests
[9182e86f]243endif
244
[01579ad]245RD_TESTS = \
[d848752]246 $(USPACE_PATH)/lib/c/test-libc \
[80da8f70]247 $(USPACE_PATH)/lib/label/test-liblabel \
[eeb23f2d]248 $(USPACE_PATH)/lib/posix/test-libposix \
[9c5e3a5]249 $(USPACE_PATH)/lib/sif/test-libsif \
[da4e695]250 $(USPACE_PATH)/lib/uri/test-liburi \
[516e780]251 $(USPACE_PATH)/lib/math/test-libmath \
[48197c1]252 $(USPACE_PATH)/drv/bus/usb/xhci/test-xhci \
[8ebc5b8a]253 $(USPACE_PATH)/app/bdsh/test-bdsh \
[64ffd83]254 $(USPACE_PATH)/srv/net/tcp/test-tcp \
255 $(USPACE_PATH)/srv/volsrv/test-volsrv \
[01579ad]256
[356c386]257RD_DATA_ESSENTIAL = \
258 $(USPACE_PATH)/app/bdsh/demo.txt
259
260RD_DATA_NON_ESSENTIAL = \
261 $(USPACE_PATH)/app/modplay/demo.xm \
262 $(USPACE_PATH)/app/viewer/logo.tga
263
[01579ad]264
[81235588]265COMPONENTS = \
[cfdeedc]266 $(KERNEL_PATH)/kernel.elf \
[4872160]267 $(INIT_TASKS) \
268 $(INITRD).img
[14f1db0]269
[94c05b89]270
[4872160]271LINK = arch/$(BARCH)/_link.ld
[4646710]272COMP = component
273COMPS = $(COMP)s
[14f1db0]274
[4872160]275-include arch/$(BARCH)/Makefile.inc
[21580dd]276
[15b592b]277ifeq ($(CONFIG_BAREBONE),y)
[5f53428a]278 RD_SRVS = $(RD_SRVS_ESSENTIAL)
279 RD_APPS = $(RD_APPS_ESSENTIAL)
280 RD_DRVS = $(RD_DRVS_ESSENTIAL)
281 RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL)
282 RD_DATA = $(RD_DATA_ESSENTIAL)
[fa9616b4]283else
[5f53428a]284 RD_SRVS = $(RD_SRVS_ESSENTIAL) $(RD_SRVS_NON_ESSENTIAL)
285 RD_APPS = $(RD_APPS_ESSENTIAL) $(RD_APPS_NON_ESSENTIAL)
286 RD_DRVS = $(RD_DRVS_ESSENTIAL) $(RD_DRVS_NON_ESSENTIAL)
287 RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL) $(RD_DRVS_FW_NON_ESSENTIAL)
288 RD_DATA = $(RD_DATA_ESSENTIAL) $(RD_DATA_NON_ESSENTIAL)
[fa9616b4]289endif
290
[4872160]291MODULES := $(notdir $(COMPONENTS))
292
293BOOT_OUTPUT ?= $(ROOT_PATH)/image.boot
294RAW ?= image.raw
295JOB ?= image.job
296MAP ?= image.map
297BUILD ?= Makefile.build
Note: See TracBrowser for help on using the repository browser.