Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.options
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OPTDBG += -bin-annot
endif

ifeq "$(PROFILING)" "YES"
BYTEDBG := -p ${BYTEDBG}
BYTEDBG := ${BYTEDBG}
OPTDBG += -p
endif

Expand Down
11 changes: 9 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ set_defaults () {
enable_natdynlink=1
enable_debug=1
enable_annot=1
enable_profiling=0
with_sqlite=1
with_pgsql=1
with_camlzip=1
Expand Down Expand Up @@ -106,7 +107,7 @@ full_pwd=`pwd`
## Option parsing

## Which options exist? eoptions for enable/disable, woptions for with/without:
eoptions="debug annot natdynlink"
eoptions="debug annot profiling natdynlink"
woptions="pgsql sqlite dbm camlzip"

print_options () {
Expand Down Expand Up @@ -181,6 +182,7 @@ usage: ./configure [ options ]

--enable-debug, --disable-debug Enable/disable debug output
--enable-annot, --disable-annot Enable/disable .cmt{,i} files generation
--enable-profiling, --disable-profiling Enable/disable profiling
--enable-natdynlink, --disable-natdynlink Enable/disable nativecode dynamic linking

--with-sqlite, --without-sqlite Compile ocsipersist with SQLite for persistent storage
Expand Down Expand Up @@ -491,6 +493,11 @@ if [ $enable_annot -gt 0 ] ; then
else
enable_annot="NO"
fi
if [ $enable_profiling -gt 0 ] ; then
enable_profiling="YES"
else
enable_profiling="NO"
fi
if [ $enable_natdynlink -gt 0 ] ; then
enable_natdynlink="YES"
else
Expand Down Expand Up @@ -574,7 +581,7 @@ DEBUG:=$enable_debug
ANNOT:=$enable_annot

# Profiling (always put NO here - but if you want to debug ocsigen):
PROFILING:=NO
PROFILING:=$enable_profiling



Expand Down
1 change: 1 addition & 0 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build: [
[
"sh"
"configure"
"--enable-profiling"
"--prefix"
"%{prefix}%"
"--ocsigen-user"
Expand Down
3 changes: 3 additions & 0 deletions src/server/ocsigen_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ let () = Ocsigen_commandline.cmdline
an exception ... *)
let _ = Sys.set_signal Sys.sigpipe Sys.Signal_ignore

(* Exit gracefully on SIGINT so that profiling will work *)
let _ = Sys.set_signal Sys.sigint (Sys.Signal_handle(fun _ -> exit 0))

let section = Lwt_log.Section.make "ocsigen:main"

(* Initialize exception handler for Lwt timeouts: *)
Expand Down