Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-22 Thread Arun Kulshreshtha
On 9/22/16, 4:21 AM, "Yuya Nishihara" wrote: On Thu, 22 Sep 2016 09:04:40 +, Arun Kulshreshtha wrote: > On 9/21/16, 8:51 PM, "Yuya Nishihara" wrote: > Perhaps we can move both

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-22 Thread Yuya Nishihara
On Thu, 22 Sep 2016 09:04:40 +, Arun Kulshreshtha wrote: > On 9/21/16, 8:51 PM, "Yuya Nishihara" y...@tcha.org> wrote: > Perhaps we can move both maybeprofile() calls to _dispatch() without > thinking > about how nested profilers behave. > >

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-22 Thread Arun Kulshreshtha
On 9/21/16, 8:51 PM, "Yuya Nishihara" wrote: On Wed, 21 Sep 2016 18:07:57 +, Arun Kulshreshtha wrote: > On 9/21/16, 7:41 AM, "Yuya Nishihara" wrote: > > maybeprofile() can be called in threads. If we need to

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-21 Thread Yuya Nishihara
On Wed, 21 Sep 2016 18:07:57 +, Arun Kulshreshtha wrote: > On 9/21/16, 7:41 AM, "Yuya Nishihara" wrote: > > maybeprofile() can be called in threads. If we need to prevent nesting, > we'll > > have to save the flag in TLS. > > That said, I'm not sure if nested

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-21 Thread Arun Kulshreshtha
On 9/21/16, 7:41 AM, "Yuya Nishihara" wrote: On Tue, 20 Sep 2016 21:49:26 +0900, Yuya Nishihara wrote: > On Mon, 19 Sep 2016 16:13:56 -0700, Arun Kulshreshtha wrote: > > # HG changeset patch > > # User Arun Kulshreshtha > > # Date 1474324901

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-21 Thread Yuya Nishihara
On Tue, 20 Sep 2016 21:49:26 +0900, Yuya Nishihara wrote: > On Mon, 19 Sep 2016 16:13:56 -0700, Arun Kulshreshtha wrote: > > # HG changeset patch > > # User Arun Kulshreshtha > > # Date 1474324901 25200 > > # Mon Sep 19 15:41:41 2016 -0700 > > # Node ID

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-20 Thread Yuya Nishihara
On Mon, 19 Sep 2016 16:13:56 -0700, Arun Kulshreshtha wrote: > # HG changeset patch > # User Arun Kulshreshtha > # Date 1474324901 25200 > # Mon Sep 19 15:41:41 2016 -0700 > # Node ID 679c90104cc1fc92099ede6bd359f6ab5b10640d > # Parent

Re: [PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-19 Thread Arun Kulshreshtha
This wasn’t caught during review, but I’ve updated this so that the nested invocation check resets itself after the root context manager exits. This ensures that if maybeprofile is called in several (non-nested) places, it won’t be the case that only the first instance enables profiling. This

[PATCH 1 of 3 v2] profiling: allow nested usage of maybeprofile

2016-09-19 Thread Arun Kulshreshtha
# HG changeset patch # User Arun Kulshreshtha # Date 1474324901 25200 # Mon Sep 19 15:41:41 2016 -0700 # Node ID 679c90104cc1fc92099ede6bd359f6ab5b10640d # Parent 285a8c3e53f2183438f0cdbc238e4ab851d0d110 profiling: allow nested usage of maybeprofile Add a check to the