[Pkg-haskell-maintainers] Bug#744240: logging alway makes 2 syscalls, even when nothing will be output
Joey Hess
joeyh at debian.org
Fri Apr 11 18:07:38 UTC 2014
Package: libghc-hslogger-dev
Version: 1.2.1+dfsg1-2+b1
Severity: normal
If I'm using hslogger for putting in debug statements, it would
be best for adding a statement to have minimal effect on CPU use.
This is not the case.
import System.Log.Logger
main = do
noticeM "foo" "bar"
main
straced yields:
clock_gettime(0x2 /* CLOCK_??? */, {0, 512615069}) = 0
clock_gettime(0x3 /* CLOCK_??? */, {0, 512642924}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 513041060}) = 0
clock_gettime(0x3 /* CLOCK_??? */, {0, 513071921}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 513472632}) = 0
clock_gettime(0x3 /* CLOCK_??? */, {0, 513498881}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 513901179}) = 0
clock_gettime(0x3 /* CLOCK_??? */, {0, 513930296}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
clock_gettime(0x2 /* CLOCK_??? */, {0, 514334060}) = 0
clock_gettime(0x3 /* CLOCK_??? */, {0, 514358986}) = 0
The 2 time lookup calls should be avoided if no timestamp is going to be printed
out.
-- System Information:
Debian Release: jessie/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libghc-hslogger-dev depends on:
ii ghc [libghc-unix-dev-2.6.0.1-4f219] 7.6.3-9
ii libc6 2.18-4
pn libghc-base-dev-4.6.0.1-8aa5d <none>
pn libghc-containers-dev-0.5.0.0-ab1da <none>
pn libghc-directory-dev-1.2.0.1-91a78 <none>
pn libghc-mtl-dev-2.1.2-94c72 <none>
ii libghc-network-dev [libghc-network-dev-2.4.1.2-fc990] 2.4.1.2-1+b1
pn libghc-old-locale-dev-1.0.0.5-6729c <none>
pn libghc-process-dev-1.1.0.2-76e05 <none>
pn libghc-time-dev-1.4.0.1-10dc4 <none>
libghc-hslogger-dev recommends no packages.
Versions of packages libghc-hslogger-dev suggests:
ii libghc-hslogger-doc 1.2.1+dfsg1-2
ii libghc-hslogger-prof 1.2.1+dfsg1-2+b1
-- no debconf information
--
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20140411/1423da7d/attachment.sig>
More information about the Pkg-haskell-maintainers
mailing list