You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Mikael Ståldal <mi...@magine.com> on 2016/03/23 17:38:53 UTC

Allocation free stacktrace formatting?

Do we have any strategy for allocation free stacktrace formatting
(PatternLayout %throwable), or is that just non-supported for
allocation-free configuration?

-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Allocation free stacktrace formatting?

Posted by Ralph Goers <ra...@dslextreme.com>.
I would reword that to say that printing stack traces is not allocation free.  It is still supported.

Ralph

> On Mar 23, 2016, at 9:57 AM, Mikael Ståldal <mi...@magine.com> wrote:
> 
> Then we should probably document that this is not supported in allocation free configuration.
> 
> On Wed, Mar 23, 2016 at 5:56 PM, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> OK.
> 
> On Wed, Mar 23, 2016 at 5:52 PM, Remko Popma <remko.popma@gmail.com <ma...@gmail.com>> wrote:
> I was not planning to put a lot of effort into trying to make printing stack traces low-GC.
> I agree with Matt that this is an expensive operation anyway and if this happens very often, allocation is probably the least of your problems...
> 
> On Thu, Mar 24, 2016 at 1:43 AM, Matt Sicker <boards@gmail.com <ma...@gmail.com>> wrote:
> Do you mean for outputting it? Because obtaining a stack trace is both a slow operation as well as one requiring an array allocation filled in from native code, so it already seems like a bad idea for high-throughput production logging unless you need it.
> 
> On 23 March 2016 at 11:38, Mikael Ståldal <mikael.staldal@magine.com <ma...@magine.com>> wrote:
> Do we have any strategy for allocation free stacktrace formatting (PatternLayout %throwable), or is that just non-supported for allocation-free configuration?
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>
> 
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   
> 
> 
> 
> -- 
>  
> 
> Mikael Ståldal
> Senior software developer 
> 
> Magine TV
> mikael.staldal@magine.com <ma...@magine.com>    
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com  <http://www.magine.com/>
> 
> Privileged and/or Confidential Information may be contained in this message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not copy or deliver this message to anyone. In such case, 
> you should destroy this message and kindly notify the sender by reply email.   


Re: Allocation free stacktrace formatting?

Posted by Mikael Ståldal <mi...@magine.com>.
Then we should probably document that this is not supported in allocation
free configuration.

On Wed, Mar 23, 2016 at 5:56 PM, Mikael Ståldal <mi...@magine.com>
wrote:

> OK.
>
> On Wed, Mar 23, 2016 at 5:52 PM, Remko Popma <re...@gmail.com>
> wrote:
>
>> I was not planning to put a lot of effort into trying to make printing
>> stack traces low-GC.
>> I agree with Matt that this is an expensive operation anyway and if this
>> happens very often, allocation is probably the least of your problems...
>>
>> On Thu, Mar 24, 2016 at 1:43 AM, Matt Sicker <bo...@gmail.com> wrote:
>>
>>> Do you mean for outputting it? Because obtaining a stack trace is both a
>>> slow operation as well as one requiring an array allocation filled in from
>>> native code, so it already seems like a bad idea for high-throughput
>>> production logging unless you need it.
>>>
>>> On 23 March 2016 at 11:38, Mikael Ståldal <mi...@magine.com>
>>> wrote:
>>>
>>>> Do we have any strategy for allocation free stacktrace formatting
>>>> (PatternLayout %throwable), or is that just non-supported for
>>>> allocation-free configuration?
>>>>
>>>> --
>>>> [image: MagineTV]
>>>>
>>>> *Mikael Ståldal*
>>>> Senior software developer
>>>>
>>>> *Magine TV*
>>>> mikael.staldal@magine.com
>>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>>
>>>> Privileged and/or Confidential Information may be contained in this
>>>> message. If you are not the addressee indicated in this message
>>>> (or responsible for delivery of the message to such a person), you may
>>>> not copy or deliver this message to anyone. In such case,
>>>> you should destroy this message and kindly notify the sender by reply
>>>> email.
>>>>
>>>
>>>
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>
>>
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Allocation free stacktrace formatting?

Posted by Mikael Ståldal <mi...@magine.com>.
OK.

On Wed, Mar 23, 2016 at 5:52 PM, Remko Popma <re...@gmail.com> wrote:

> I was not planning to put a lot of effort into trying to make printing
> stack traces low-GC.
> I agree with Matt that this is an expensive operation anyway and if this
> happens very often, allocation is probably the least of your problems...
>
> On Thu, Mar 24, 2016 at 1:43 AM, Matt Sicker <bo...@gmail.com> wrote:
>
>> Do you mean for outputting it? Because obtaining a stack trace is both a
>> slow operation as well as one requiring an array allocation filled in from
>> native code, so it already seems like a bad idea for high-throughput
>> production logging unless you need it.
>>
>> On 23 March 2016 at 11:38, Mikael Ståldal <mi...@magine.com>
>> wrote:
>>
>>> Do we have any strategy for allocation free stacktrace formatting
>>> (PatternLayout %throwable), or is that just non-supported for
>>> allocation-free configuration?
>>>
>>> --
>>> [image: MagineTV]
>>>
>>> *Mikael Ståldal*
>>> Senior software developer
>>>
>>> *Magine TV*
>>> mikael.staldal@magine.com
>>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>>
>>> Privileged and/or Confidential Information may be contained in this
>>> message. If you are not the addressee indicated in this message
>>> (or responsible for delivery of the message to such a person), you may
>>> not copy or deliver this message to anyone. In such case,
>>> you should destroy this message and kindly notify the sender by reply
>>> email.
>>>
>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Allocation free stacktrace formatting?

Posted by Remko Popma <re...@gmail.com>.
I was not planning to put a lot of effort into trying to make printing
stack traces low-GC.
I agree with Matt that this is an expensive operation anyway and if this
happens very often, allocation is probably the least of your problems...

On Thu, Mar 24, 2016 at 1:43 AM, Matt Sicker <bo...@gmail.com> wrote:

> Do you mean for outputting it? Because obtaining a stack trace is both a
> slow operation as well as one requiring an array allocation filled in from
> native code, so it already seems like a bad idea for high-throughput
> production logging unless you need it.
>
> On 23 March 2016 at 11:38, Mikael Ståldal <mi...@magine.com>
> wrote:
>
>> Do we have any strategy for allocation free stacktrace formatting
>> (PatternLayout %throwable), or is that just non-supported for
>> allocation-free configuration?
>>
>> --
>> [image: MagineTV]
>>
>> *Mikael Ståldal*
>> Senior software developer
>>
>> *Magine TV*
>> mikael.staldal@magine.com
>> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>>
>> Privileged and/or Confidential Information may be contained in this
>> message. If you are not the addressee indicated in this message
>> (or responsible for delivery of the message to such a person), you may
>> not copy or deliver this message to anyone. In such case,
>> you should destroy this message and kindly notify the sender by reply
>> email.
>>
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>

Re: Allocation free stacktrace formatting?

Posted by Matt Sicker <bo...@gmail.com>.
Do you mean for outputting it? Because obtaining a stack trace is both a
slow operation as well as one requiring an array allocation filled in from
native code, so it already seems like a bad idea for high-throughput
production logging unless you need it.

On 23 March 2016 at 11:38, Mikael Ståldal <mi...@magine.com> wrote:

> Do we have any strategy for allocation free stacktrace formatting
> (PatternLayout %throwable), or is that just non-supported for
> allocation-free configuration?
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> mikael.staldal@magine.com
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>



-- 
Matt Sicker <bo...@gmail.com>