Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
cd3374d4
Commit
cd3374d4
authored
May 25, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More clang updates.
parent
7c4b96b5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
22 deletions
+38
-22
Makefile.ekam
c++/Makefile.ekam
+12
-11
configure.ac
c++/configure.ac
+1
-1
runner.c++
c++/src/capnproto/benchmark/runner.c++
+17
-6
cxx.md
doc/cxx.md
+4
-2
install.md
doc/install.md
+4
-2
No files found.
c++/Makefile.ekam
View file @
cd3374d4
...
...
@@ -2,27 +2,28 @@
EKAM
=
`
which ekam
||
echo
.ekam/bin/ekam
`
ifeq
($(CXX),clang++)
# Clang's verbose diagnostics don't play nice with the Ekam Eclipse plugin's error parsing,
# so disable them.
EXTRA_FLAG
=
-fno-caret-diagnostics
else
EXTRA_FLAG
=
endif
all
:
echo
"You probably accidentally told Eclipse to build. Stopping."
once
:
CXX
=
g++-4.7
CXXFLAGS
=
'-std=gnu++0x -O2 -DNDEBUG -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
CXX
FLAGS
=
"
$(EXTRA_FLAG)
-std=c++11 -O2 -DNDEBUG -Wall"
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
continuous
:
CXX
=
g++-4.7
CXXFLAGS
=
'-std=gnu++0x -g -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
CXX
FLAGS
=
"
$(EXTRA_FLAG)
-std=c++11 -g -Wall"
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
continuous-opt
:
CXX
=
g++-4.7
CXXFLAGS
=
'-std=gnu++0x -O2 -DNDEBUG -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
CXX
FLAGS
=
"
$(EXTRA_FLAG)
-std=c++11 -O2 -DNDEBUG -Wall"
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
continuous-opt3
:
CXX
=
g++-4.7
CXXFLAGS
=
'-std=gnu++0x -O3 -DNDEBUG -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
continuous-clang
:
CXX
=
clang++
CXXFLAGS
=
'-fno-caret-diagnostics -std=c++1y -g -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
continuous-clang-opt
:
CXX
=
clang++
CXXFLAGS
=
'-fno-caret-diagnostics -std=c++11 -O2 -DNDEBUG -Wall'
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
CXXFLAGS
=
"
$(EXTRA_FLAG)
-std=c++11 -O3 -DNDEBUG -Wall"
LIBS
=
'-lz -pthread'
$(EKAM)
-j6
-c
-n
:51315
clean
:
rm
-rf
bin lib tmp
c++/configure.ac
View file @
cd3374d4
...
...
@@ -25,7 +25,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11
AX_CXX_COMPILE_STDCXX_11
([noext])
ACX_PTHREAD
LIBS="$PTHREAD_LIBS $LIBS"
...
...
c++/src/capnproto/benchmark/runner.c++
View file @
cd3374d4
...
...
@@ -519,6 +519,8 @@ int main(int argc, char* argv[]) {
size_t
protobufObjSize
=
fileSize
(
std
::
string
(
testCaseName
(
testCase
))
+
".pb.o"
);
size_t
capnpObjSize
=
fileSize
(
std
::
string
(
testCaseName
(
testCase
))
+
".capnp.o"
);
TestResult
oldNullCase
;
TestResult
oldNullCaseNoReuse
;
TestResult
oldCapnpBase
;
TestResult
oldCapnpNoReuse
;
TestResult
oldCapnp
;
...
...
@@ -535,6 +537,11 @@ int main(int argc, char* argv[]) {
perror
(
oldDir
);
return
1
;
}
oldNullCase
=
runTest
(
Product
::
NULLCASE
,
testCase
,
Mode
::
OBJECT_SIZE
,
Reuse
::
YES
,
compression
,
iters
);
reportResults
(
"Old theoretical best pass-by-object"
,
iters
,
nullCase
);
oldCapnpBase
=
runTest
(
Product
::
CAPNPROTO
,
testCase
,
Mode
::
OBJECTS
,
Reuse
::
YES
,
compression
,
iters
);
oldCapnpBase
.
objectSize
=
runTest
(
...
...
@@ -542,6 +549,10 @@ int main(int argc, char* argv[]) {
.
objectSize
;
reportResults
(
"Old Cap'n Proto pass-by-object"
,
iters
,
oldCapnpBase
);
oldNullCaseNoReuse
=
runTest
(
Product
::
NULLCASE
,
testCase
,
Mode
::
OBJECT_SIZE
,
Reuse
::
NO
,
compression
,
iters
);
reportResults
(
"Old theoretical best w/o object reuse"
,
iters
,
oldNullCaseNoReuse
);
oldCapnpNoReuse
=
runTest
(
Product
::
CAPNPROTO
,
testCase
,
Mode
::
OBJECTS
,
Reuse
::
NO
,
compression
,
iters
);
oldCapnpNoReuse
.
objectSize
=
runTest
(
...
...
@@ -599,15 +610,15 @@ int main(int argc, char* argv[]) {
reportOldNewComparisonHeader
();
reportComparison
(
"memory overhead"
,
n
ullCase
.
objectSize
,
oldCapnpBase
.
objectSize
,
capnpBase
.
objectSize
,
iters
);
oldN
ullCase
.
objectSize
,
oldCapnpBase
.
objectSize
,
capnpBase
.
objectSize
,
iters
);
reportComparison
(
"memory overhead w/o object reuse"
,
n
ullCaseNoReuse
.
objectSize
,
oldCapnpNoReuse
.
objectSize
,
capnpNoReuse
.
objectSize
,
iters
);
oldN
ullCaseNoReuse
.
objectSize
,
oldCapnpNoReuse
.
objectSize
,
capnpNoReuse
.
objectSize
,
iters
);
reportComparison
(
"object manipulation time (us)"
,
""
,
((
int64_t
)
oldCapnpBase
.
time
.
user
-
(
int64_t
)
n
ullCase
.
time
.
user
)
/
1000.0
,
((
int64_t
)
capnpBase
.
time
.
user
-
(
int64_t
)
n
ullCase
.
time
.
user
)
/
1000.0
,
iters
);
((
int64_t
)
oldCapnpBase
.
time
.
user
-
(
int64_t
)
oldN
ullCase
.
time
.
user
)
/
1000.0
,
((
int64_t
)
capnpBase
.
time
.
user
-
(
int64_t
)
oldN
ullCase
.
time
.
user
)
/
1000.0
,
iters
);
reportComparison
(
"object manipulation time w/o reuse (us)"
,
""
,
((
int64_t
)
oldCapnpNoReuse
.
time
.
user
-
(
int64_t
)
n
ullCaseNoReuse
.
time
.
user
)
/
1000.0
,
((
int64_t
)
capnpNoReuse
.
time
.
user
-
(
int64_t
)
n
ullCaseNoReuse
.
time
.
user
)
/
1000.0
,
iters
);
((
int64_t
)
oldCapnpNoReuse
.
time
.
user
-
(
int64_t
)
oldN
ullCaseNoReuse
.
time
.
user
)
/
1000.0
,
((
int64_t
)
capnpNoReuse
.
time
.
user
-
(
int64_t
)
oldN
ullCaseNoReuse
.
time
.
user
)
/
1000.0
,
iters
);
reportComparison
(
"I/O time (us)"
,
""
,
((
int64_t
)
oldCapnp
.
time
.
user
-
(
int64_t
)
oldCapnpBase
.
time
.
user
)
/
1000.0
,
((
int64_t
)
capnp
.
time
.
user
-
(
int64_t
)
capnpBase
.
time
.
user
)
/
1000.0
,
iters
);
...
...
doc/cxx.md
View file @
cd3374d4
...
...
@@ -123,8 +123,10 @@ void printAddressBook(int fd) {
## C++ Feature Usage: C++11, Exceptions
This implementation makes use of C++11 features. If you are using GCC, you will need at least
version 4.7 to compile Cap'n Proto, with
`--std=gnu++0x`
. Other compilers have not been tested at
this time.
version 4.7 to compile Cap'n Proto. If you are using Clang, you will need at least version 3.2.
These compilers required the flag
`-std=c++11`
to enable C++11 features -- your code which
`#include`
s Cap'n Proto headers will need to be compiled with this flag. Other compilers have not
been tested at this time.
This implementation prefers to handle errors using exceptions. Exceptions are only used in
circumstances that should never occur in normal operation. For example, exceptions are thrown
...
...
doc/install.md
View file @
cd3374d4
...
...
@@ -51,10 +51,12 @@ attempt to build the C++ runtime.
## Installing the C++ Runtime
### GCC 4.7 Needed
### GCC 4.7
or Clang 3.2
Needed
If you are using GCC, you MUST use at least version 4.7 as Cap'n Proto uses recently-implemented
C++11 features. If you are using some other compiler... good luck.
C++11 features. If you are using Clang, you must use at least version 3.2. To use Clang, set
the environment variable
`CXX=clang++`
before following any instructions below, otherwise
`g++`
is
used by default.
### Building with Ekam
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment