View | Details | Raw Unified | Return to bug 200949 | Differences between
and this patch

Collapse All | Expand All

(-)benchmarks/Makefile (+1 lines)
Lines 70-75 Link Here
70
    SUBDIR += smhasher
70
    SUBDIR += smhasher
71
    SUBDIR += spp
71
    SUBDIR += spp
72
    SUBDIR += stream
72
    SUBDIR += stream
73
    SUBDIR += stress-ng
73
    SUBDIR += super-smack
74
    SUBDIR += super-smack
74
    SUBDIR += sysbench
75
    SUBDIR += sysbench
75
    SUBDIR += tcpblast
76
    SUBDIR += tcpblast
(-)benchmarks/stress-ng/Makefile (+21 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	stress-ng
4
PORTVERSION=	0.04.06
5
CATEGORIES=	benchmarks
6
MASTER_SITES=	http://kernel.ubuntu.com/~cking/tarballs/stress-ng/
7
8
MAINTAINER=	luca.pizzamiglio@gmail.com
9
COMMENT=	Stress test benchmarks
10
11
LICENSE=	GPLv2
12
13
ALL_TARGET=	# empty
14
15
PLIST_FILES=	bin/stress-ng man/man1/stress-ng.1.gz
16
17
do-install:
18
	${INSTALL_PROGRAM} ${WRKSRC}/stress-ng ${STAGEDIR}${PREFIX}/bin
19
	${INSTALL_MAN} ${WRKSRC}/stress-ng.1 ${STAGEDIR}${MANDIRS}/man1
20
21
.include <bsd.port.mk>
(-)benchmarks/stress-ng/distinfo (+2 lines)
Added Link Here
1
SHA256 (stress-ng-0.04.06.tar.gz) = 3a7dc3d42db9317948f367b8c743b08118adcd84fc1a3bdfc12fd0fe9f0994c7
2
SIZE (stress-ng-0.04.06.tar.gz) = 209882
(-)benchmarks/stress-ng/files/patch-stress-cpu.c (+87 lines)
Added Link Here
1
--- stress-cpu.c.orig	2015-06-02 19:36:12 UTC
2
+++ stress-cpu.c
3
@@ -54,10 +54,15 @@
4
 #endif
5
 
6
 #if defined(__FreeBSD__)
7
+#include <sys/param.h>
8
 #define	ccosl	ccos
9
 #define	csinl	csin
10
 #define cpow	pow
11
 #define powl	pow
12
+#define logl	log
13
+#define expl	exp
14
+#define coshl	cosh
15
+#define	sinhl	sinh
16
 #endif
17
 
18
 /*
19
@@ -392,6 +397,7 @@ static void HOT OPTIMIZE3 stress_cpu_phi
20
 		pr_fail(stderr, "%s: Golden Ratio phi not accurate enough\n", name);
21
 }
22
 
23
+#if __FreeBSD_version >= 900000
24
 /*
25
  *  fft_partial()
26
  *  	partial Fast Fourier Transform
27
@@ -432,6 +438,7 @@ static void HOT stress_cpu_fft(const cha
28
 	memcpy(tmp, buf, sizeof(double complex) * FFT_SIZE);
29
 	fft_partial(buf, tmp, FFT_SIZE, 1);
30
 }
31
+#endif /* __FreeBSD_version >= 900000 */
32
 
33
 /*
34
  *   stress_cpu_euler()
35
@@ -846,6 +853,7 @@ stress_cpu_fp(_Decimal64, decimal64, sin
36
 stress_cpu_fp(_Decimal128, decimal128, sinl, cosl)
37
 #endif
38
 
39
+#if defined(__STDC_IEC_559_COMPLEX__)
40
 /*
41
  *  Generic complex stressor macro
42
  */
43
@@ -869,6 +877,7 @@ static void HOT OPTIMIZE3 stress_cpu_ ##
44
 stress_cpu_complex(complex float, complex_float, csinf, ccosf)
45
 stress_cpu_complex(complex double, complex_double, csin, ccos)
46
 stress_cpu_complex(complex long double, complex_long_double, csinl, ccosl)
47
+#endif /* __STDC_IEC_559_COMPLEX__ */
48
 
49
 #define int_float_ops(_ftype, flt_a, flt_b, flt_c, flt_d,	\
50
 	_sin, _cos, int_a, int_b, _c1, _c2, _c3)		\
51
@@ -1651,10 +1660,10 @@ static uint8_t HOT OPTIMIZE3 hamming84(c
52
 	 * G[] is reversed to turn G[3-j] into G[j] to save a subtraction
53
 	 */
54
 	static const uint8_t G[] = {
55
-		0b11110001,
56
-		0b11010010,
57
-		0b10110100,
58
-		0b01111000,
59
+		0xF1,
60
+		0xD2,
61
+		0xB4,
62
+		0x78,
63
 	};
64
 
65
 	register uint8_t code = 0;
66
@@ -1921,9 +1930,11 @@ static stress_cpu_stressor_info_t cpu_me
67
 	{ "ackermann",		stress_cpu_ackermann },
68
 	{ "bitops",		stress_cpu_bitops },
69
 	{ "callfunc",		stress_cpu_callfunc },
70
+#if defined(__STDC_IEC_559_COMPLEX__)
71
 	{ "cdouble",		stress_cpu_complex_double },
72
 	{ "cfloat",		stress_cpu_complex_float },
73
 	{ "clongdouble",	stress_cpu_complex_long_double },
74
+#endif /* __STDC_IEC_559_COMPLEX__ */
75
 	{ "correlate",		stress_cpu_correlate },
76
 	{ "crc16",		stress_cpu_crc16 },
77
 #if defined(STRESS_FLOAT_DECIMAL)
78
@@ -1936,7 +1947,9 @@ static stress_cpu_stressor_info_t cpu_me
79
 	{ "double",		stress_cpu_double },
80
 	{ "euler",		stress_cpu_euler },
81
 	{ "explog",		stress_cpu_explog },
82
+#if __FreeBSD_version >= 900000
83
 	{ "fft",		stress_cpu_fft },
84
+#endif /* __FreeBSD_version >= 900000 */
85
 	{ "fibonacci",		stress_cpu_fibonacci },
86
 	{ "float",		stress_cpu_float },
87
 	{ "fnv1a",		stress_cpu_fnv1a },
(-)benchmarks/stress-ng/files/patch-stress-vm.c (+11 lines)
Added Link Here
1
--- stress-vm.c.orig	2015-06-17 09:02:30 UTC
2
+++ stress-vm.c
3
@@ -952,7 +952,7 @@ static size_t stress_vm_flip(
4
 {
5
 	const size_t chunk_sz = sizeof(uint8_t) * 8;
6
 	volatile uint8_t *ptr;
7
-	uint8_t *buf_end = buf + sz, bit = 0b00000011;
8
+	uint8_t *buf_end = buf + sz, bit = 0x03;
9
 	uint64_t w, z, c = *counter;
10
 	size_t bit_errors = 0, i;
11
 
(-)benchmarks/stress-ng/pkg-descr (+5 lines)
Added Link Here
1
This stress test suite will stress a computer system in various selectable ways
2
It was designed to exercise various physical subsystems of a computer as well
3
as various operating system kernel interfaces.
4
5
WWW: http://kernel.ubuntu.com/~cking/stress-ng/

Return to bug 200949