[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Wed Jun 1 19:10:03 UTC 2016
The branch, master has been updated
via e8c9e10 talloc: rename local timeval function copies
from f8141e9 ctdb-recoverd: Freeze databases whenever the node is INACTIVE
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e8c9e10dbbc585f346a4159b75fcc024cfe1c01a
Author: Ralph Boehme <slow at samba.org>
Date: Wed Jun 1 15:42:13 2016 +0200
talloc: rename local timeval function copies
timeval_current() and timeval_elapsed() are public functions from
libsamba-util. Redeclaring them as static functions here triggers linker
error when building with gcc link-time-optimisation (LTO).
This shows the error after reverting this patch:
[slow at kazak lto]$ make -j
WAF_MAKE=1 python ./buildtools/bin/waf build
Waf: Entering directory `/home/slow/git/samba/lto/bin'
Selected embedded Heimdal build
[ 174/4259] Generating ctdb-samba-version-header
[ 174/4259] Generating ctdb-samba-version-header
[ 521/4259] Generating source4/torture/local/proto.h
[2565/4259] Compiling lib/talloc/testsuite.c
[4125/4259] Linking default/source4/torture/smbtorture
/tmp/ccvL9UCe.ltrans3.ltrans.o:<artificial>:function smbsrv_accept.lto_priv.11: error: undefined reference to 'timeval_current.lto_priv.630'
/tmp/ccvL9UCe.ltrans4.ltrans.o:<artificial>:function smbsrv_recv_smb2_request: error: undefined reference to 'timeval_current.lto_priv.630'
/tmp/ccvL9UCe.ltrans4.ltrans.o:<artificial>:function smb2srv_negprot_backend: error: undefined reference to 'timeval_current.lto_priv.630'
/tmp/ccvL9UCe.ltrans4.ltrans.o:<artificial>:function smb2srv_negprot_backend: error: undefined reference to 'timeval_current.lto_priv.630'
/tmp/ccvL9UCe.ltrans9.ltrans.o:<artificial>:function test_smb2_oplock_batch22: error: undefined reference to 'timeval_elapsed.lto_priv.628'
/tmp/ccvL9UCe.ltrans9.ltrans.o:<artificial>:function test_smb2_bench_oplock: error: undefined reference to 'timeval_elapsed.lto_priv.628'
/tmp/ccvL9UCe.ltrans9.ltrans.o:<artificial>:function test_smb2_bench_oplock: error: undefined reference to 'timeval_elapsed.lto_priv.628'
/tmp/ccvL9UCe.ltrans9.ltrans.o:<artificial>:function test_smb2_bench_oplock: error: undefined reference to 'timeval_elapsed.lto_priv.628'
collect2: error: ld returned 1 exit status
...
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Volker Lendecke <vl at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Wed Jun 1 21:09:16 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
lib/talloc/testsuite.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c
index 5eab839..dd49df1 100644
--- a/lib/talloc/testsuite.c
+++ b/lib/talloc/testsuite.c
@@ -36,16 +36,16 @@
#include "talloc_testsuite.h"
-static struct timeval timeval_current(void)
+static struct timeval private_timeval_current(void)
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv;
}
-static double timeval_elapsed(struct timeval *tv)
+static double private_timeval_elapsed(struct timeval *tv)
{
- struct timeval tv2 = timeval_current();
+ struct timeval tv2 = private_timeval_current();
return (tv2.tv_sec - tv->tv_sec) +
(tv2.tv_usec - tv->tv_usec)*1.0e-6;
}
@@ -835,7 +835,7 @@ static bool test_speed(void)
printf("test: speed\n# TALLOC VS MALLOC SPEED\n");
- tv = timeval_current();
+ tv = private_timeval_current();
count = 0;
do {
void *p1, *p2, *p3;
@@ -848,15 +848,15 @@ static bool test_speed(void)
talloc_free(p1);
}
count += 3 * loop;
- } while (timeval_elapsed(&tv) < 5.0);
+ } while (private_timeval_elapsed(&tv) < 5.0);
- fprintf(stderr, "talloc: %.0f ops/sec\n", count/timeval_elapsed(&tv));
+ fprintf(stderr, "talloc: %.0f ops/sec\n", count/private_timeval_elapsed(&tv));
talloc_free(ctx);
ctx = talloc_pool(NULL, 1024);
- tv = timeval_current();
+ tv = private_timeval_current();
count = 0;
do {
void *p1, *p2, *p3;
@@ -869,13 +869,13 @@ static bool test_speed(void)
talloc_free(p1);
}
count += 3 * loop;
- } while (timeval_elapsed(&tv) < 5.0);
+ } while (private_timeval_elapsed(&tv) < 5.0);
talloc_free(ctx);
- fprintf(stderr, "talloc_pool: %.0f ops/sec\n", count/timeval_elapsed(&tv));
+ fprintf(stderr, "talloc_pool: %.0f ops/sec\n", count/private_timeval_elapsed(&tv));
- tv = timeval_current();
+ tv = private_timeval_current();
count = 0;
do {
void *p1, *p2, *p3;
@@ -888,8 +888,8 @@ static bool test_speed(void)
free(p3);
}
count += 3 * loop;
- } while (timeval_elapsed(&tv) < 5.0);
- fprintf(stderr, "malloc: %.0f ops/sec\n", count/timeval_elapsed(&tv));
+ } while (private_timeval_elapsed(&tv) < 5.0);
+ fprintf(stderr, "malloc: %.0f ops/sec\n", count/private_timeval_elapsed(&tv));
printf("success: speed\n");
--
Samba Shared Repository
More information about the samba-cvs
mailing list