+1 on not logging by default, but when using images as servers and/or
running headless it seems that logging interrupts would be desirable.
Sven, I think that Pharo already does some truncation of the stacks and
frankly IMHO, if you are going to truncate the stack don't bother
writing it at all .... Nothing more frustrating that reading down a
printed stack only to find the bit that you NEED has been truncated!
If there are folks who prefer truncated stacks, then perhaps that needs
to be an option as well ...
It seems that the debugger in Pharo5.0 truncates the number of frames
supplied when you copy the stack as well - I assume it is using the
stack logger code that is already truncating stacks :)
Dale
On 8/14/16 12:24 AM, Tudor Girba wrote:
Hi,
On Aug 14, 2016, at 9:14 AM, Max Leske <maxle...@gmail.com> wrote:
Awesome Denis!
On 13 Aug 2016, at 10:54, Tudor Girba <tu...@tudorgirba.com> wrote:
Very cool analysis!
What would your proposal be in this case?
Some ideas:
- perform logging in a separate process
- only log user interrupt once for any given time interval, i.e., while a
previous interrupt is being logged, ignore logging for further interrupts.
Alternatively: don’t log user interrupts. I don’t really see the value anyway.
I kind of like the idea of not logging user interrupts. What do others think?
Cheers,
Doru
Cheers,
Max
Doru
On Aug 13, 2016, at 10:42 AM, Denis Kudriashov <dionisi...@gmail.com> wrote:
We had discussion on reasons why cmd+. is not always working.
I made simple test which shows that VM is not issue. Following code normally
stops after 20 seconds:
hanging := [1 seconds wait. 1 recursionTest] newProcess.
hanging priority: Processor activePriority + 10.
interruptor := [ 20 seconds wait. hanging suspend] newProcess.
interruptor priority: Processor activePriority + 11.
hanging resume.
interruptor resume.
Recursion method:
Integer>>recursionTest
self recursionTest
Hanging process produces 7 million contexts on my machine:
c := hanging suspendedContext.
count := 1.
[ c notNil ] whileTrue: [ c := c sender. count := count + 1 ].
count «7395279"
But if you try to debug it by "hanging debug" you will see how it is slow. It's
caused by printing stack to file.
Interesting that logging is performed before opening debugger. So every time we
press cmd+. we are waiting logging to see debugger.
We need to change this logic.
Best regards,
Denis
--
www.tudorgirba.com
www.feenk.com
"One cannot do more than one can do."
--
www.tudorgirba.com
www.feenk.com
"Yesterday is a fact.
Tomorrow is a possibility.
Today is a challenge."