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 (+28 lines)
Added Link Here
1
# $FreeBSD$
2
3
PORTNAME=	stress-ng
4
PORTVERSION=	0.04.12
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
.include <bsd.port.pre.mk>
18
19
.if ${OSVERSION} < 900000
20
EXTRAPATCH+=	${FILESDIR}/extra-patch-stress-cpu.c \
21
		${FILESDIR}/extra-patch-stree-vm.c
22
.endif
23
24
do-install:
25
	${INSTALL_PROGRAM} ${WRKSRC}/stress-ng ${STAGEDIR}${PREFIX}/bin
26
	${INSTALL_MAN} ${WRKSRC}/stress-ng.1 ${STAGEDIR}${MANDIRS}/man1
27
28
.include <bsd.port.post.mk>
(-)benchmarks/stress-ng/distinfo (+2 lines)
Added Link Here
1
SHA256 (stress-ng-0.04.12.tar.gz) = f54d245ee58c4630d475826d1a85d2eb178441ff5378cd913d0bfe16a2aa853d
2
SIZE (stress-ng-0.04.12.tar.gz) = 226964
(-)benchmarks/stress-ng/files/extra-patch-stress-cpu.c (+44 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
@@ -392,6 +397,7 @@ static void HOT OPTIMIZE3 stress_cpu_phi
5
 		pr_fail(stderr, "%s: Golden Ratio phi not accurate enough\n", name);
6
 }
7
 
8
+#if 0
9
 /*
10
  *  fft_partial()
11
  *  	partial Fast Fourier Transform
12
@@ -432,6 +438,7 @@ static void HOT stress_cpu_fft(const cha
13
 	memcpy(tmp, buf, sizeof(double complex) * FFT_SIZE);
14
 	fft_partial(buf, tmp, FFT_SIZE, 1);
15
 }
16
+#endif
17
 
18
 /*
19
  *   stress_cpu_euler()
20
@@ -1651,10 +1660,10 @@ static uint8_t HOT OPTIMIZE3 hamming84(c
21
 	 * G[] is reversed to turn G[3-j] into G[j] to save a subtraction
22
 	 */
23
 	static const uint8_t G[] = {
24
-		0b11110001,
25
-		0b11010010,
26
-		0b10110100,
27
-		0b01111000,
28
+		0xF1,
29
+		0xD2,
30
+		0xB4,
31
+		0x78,
32
 	};
33
 
34
 	register uint8_t code = 0;
35
@@ -1936,7 +1947,9 @@ static stress_cpu_stressor_info_t cpu_me
36
 	{ "double",		stress_cpu_double },
37
 	{ "euler",		stress_cpu_euler },
38
 	{ "explog",		stress_cpu_explog },
39
+#if 0
40
 	{ "fft",		stress_cpu_fft },
41
+#endif
42
 	{ "fibonacci",		stress_cpu_fibonacci },
43
 	{ "float",		stress_cpu_float },
44
 	{ "fnv1a",		stress_cpu_fnv1a },
(-)benchmarks/stress-ng/files/extra-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/files/patch-stress-cpu.c (+45 lines)
Added Link Here
1
--- stress-cpu.c.orig	2015-06-02 19:36:12 UTC
2
+++ stress-cpu.c
3
@@ -54,10 +54,14 @@
4
 #endif
5
 
6
 #if defined(__FreeBSD__)
7
 #define	ccosl	ccos
8
 #define	csinl	csin
9
 #define cpow	pow
10
 #define powl	pow
11
+#define logl	log
12
+#define expl	exp
13
+#define coshl	cosh
14
+#define	sinhl	sinh
15
 #endif
16
 
17
 /*
18
@@ -846,6 +853,7 @@ stress_cpu_fp(_Decimal64, decimal64, sin
19
 stress_cpu_fp(_Decimal128, decimal128, sinl, cosl)
20
 #endif
21
 
22
+#if defined(__STDC_IEC_559_COMPLEX__)
23
 /*
24
  *  Generic complex stressor macro
25
  */
26
@@ -869,6 +877,7 @@ static void HOT OPTIMIZE3 stress_cpu_ ##
27
 stress_cpu_complex(complex float, complex_float, csinf, ccosf)
28
 stress_cpu_complex(complex double, complex_double, csin, ccos)
29
 stress_cpu_complex(complex long double, complex_long_double, csinl, ccosl)
30
+#endif /* __STDC_IEC_559_COMPLEX__ */
31
 
32
 #define int_float_ops(_ftype, flt_a, flt_b, flt_c, flt_d,	\
33
 	_sin, _cos, int_a, int_b, _c1, _c2, _c3)		\
34
@@ -1921,9 +1930,11 @@ static stress_cpu_stressor_info_t cpu_me
35
 	{ "ackermann",		stress_cpu_ackermann },
36
 	{ "bitops",		stress_cpu_bitops },
37
 	{ "callfunc",		stress_cpu_callfunc },
38
+#if defined(__STDC_IEC_559_COMPLEX__)
39
 	{ "cdouble",		stress_cpu_complex_double },
40
 	{ "cfloat",		stress_cpu_complex_float },
41
 	{ "clongdouble",	stress_cpu_complex_long_double },
42
+#endif /* __STDC_IEC_559_COMPLEX__ */
43
 	{ "correlate",		stress_cpu_correlate },
44
 	{ "crc16",		stress_cpu_crc16 },
45
 #if defined(STRESS_FLOAT_DECIMAL)
(-)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