Skip to content

Commit 00569ac

Browse files
committed
more alloc stats
1 parent 11f9f94 commit 00569ac

File tree

11 files changed

+18
-15
lines changed

11 files changed

+18
-15
lines changed

lib/pure/cgi.nim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,14 @@ Content-Type: text/html
289289
proc writeErrorMessage*(data: string) =
290290
## Tries to reset browser state and writes `data` to stdout in
291291
## <plaintext> tag.
292-
resetForStacktrace()
293-
# We use <plaintext> here, instead of escaping, so stacktrace can
294-
# be understood by human looking at source.
295-
stdout.write("<plaintext>\n")
296-
stdout.write(data)
292+
try:
293+
resetForStacktrace()
294+
# We use <plaintext> here, instead of escaping, so stacktrace can
295+
# be understood by human looking at source.
296+
stdout.write("<plaintext>\n")
297+
stdout.write(data)
298+
except IOError as exc:
299+
discard # Too bad..
297300

298301
proc setStackTraceStdout*() =
299302
## Makes Nim output stacktraces to stdout, instead of server log.

tests/arc/tasyncleak.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
discard """
22
outputsub: "(allocCount: 4011, deallocCount: 4009)"
3-
cmd: "nim c --gc:orc -d:nimAllocStats $file"
3+
cmd: "nim c --gc:orc -d:nimAllocStats -d:noSignalHandler $file"
44
"""
55

66
import asyncdispatch

tests/arc/tclosureiter.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c -d:nimAllocStats --gc:arc $file'''
2+
cmd: '''nim c -d:nimAllocStats -d:noSignalHandler --gc:arc $file'''
33
output: '''(allocCount: 102, deallocCount: 102)'''
44
"""
55

tests/arc/thamming_orc.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
discard """
22
output: '''(allocCount: 1114, deallocCount: 1112)
33
created 491 destroyed 491'''
4-
cmd: "nim c --gc:orc -d:nimAllocStats $file"
4+
cmd: "nim c --gc:orc -d:nimAllocStats -d:noSignalHandler $file"
55
"""
66

77
# bug #18421

tests/arc/tnewseq_legacy.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
discard """
22
output: "(allocCount: 201, deallocCount: 201)"
3-
cmd: "nim c --gc:orc -d:nimAllocStats $file"
3+
cmd: "nim c --gc:orc -d:nimAllocStats -d:noSignalHandler $file"
44
"""
55

66
proc main(prefix: string) =

tests/destructor/tbintree2.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c -d:nimAllocStats --newruntime $file'''
2+
cmd: '''nim c -d:nimAllocStats -d:noSignalHandler --newruntime $file'''
33
output: '''0
44
(allocCount: 5, deallocCount: 5)'''
55
"""

tests/destructor/tgcdestructors.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c -d:nimAllocStats --gc:arc $file'''
2+
cmd: '''nim c -d:nimAllocStats -d:noSignalHandler --gc:arc $file'''
33
output: '''hi
44
ho
55
ha

tests/destructor/tnewruntime_misc.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim cpp -d:nimAllocStats --newruntime --threads:on $file'''
2+
cmd: '''nim cpp -d:nimAllocStats -d:noSignalHandler --newruntime --threads:on $file'''
33
output: '''(field: "value")
44
Indeed
55
axc

tests/destructor/towned_binary_tree.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c -d:nimAllocStats --gc:arc $file'''
2+
cmd: '''nim c -d:nimAllocStats -d:noSignalHandler --gc:arc $file'''
33
output: '''31665
44
(allocCount: 33334, deallocCount: 33334)'''
55
"""

tests/destructor/twidgets.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: '''nim c -d:nimAllocStats --newruntime $file'''
2+
cmd: '''nim c -d:nimAllocStats -d:noSignalHandler --newruntime $file'''
33
output: '''button
44
clicked!
55
(allocCount: 4, deallocCount: 4)'''

0 commit comments

Comments
 (0)