On 27/03/18 17:18, Vincent St-Amour wrote:
> On Tue, 27 Mar 2018 07:55:08 -0500,
> 'Paulo Matos' via Racket Users wrote:
>>
>> I was trying to confirm my suspicion that profile needs to be manually
>> setup in each place for profiling.
> 
> Right. Each place has its own separate runtime, and the profile only
> spans a single runtime.
> 
>> Is this a possibility or is there something out there to make this
>> easier? Also, profile-thunk says that:
>> "To track all threads, specify a non-#f value for the threads?
>> argument―this will execute the computation in a fresh custodian, and
>> keep track of all threads under this custodian."
>>
>> But what happens if the place itself creates its own custodian to launch
>> threads?
> 
> In this case, thread refers to Racket's concurrency mechanism; this is
> unrelated to places.
> 

I understand that, what I meant was that I was wondering what would
happen (haven't tried it yet) if the place spawned by `dynamic-place`
creates a new custodian and uses that to create new threads. Would
profiling through the place, with #:threads #t, still profile the
threads? -- maybe I need to create an example.

> On Tue, 27 Mar 2018 08:15:19 -0500,
> 'Paulo Matos' via Racket Users wrote:
>>
>>
>>
>> On 27/03/18 14:55, 'Paulo Matos' via Racket Users wrote:
>>>
>>> 1. setup a profile command line argument that's passed to places-profile.rkt
>>> 2. send a flag indicating if we need profiling in any-double?
>>> 3. then use profile-thunk on the function if profiling is required, or
>>> nothing if profiling is not required.
>>>
>>
>> I have attempted this:
>> [...]
> 
> I get profiling information (including periodic reports) when I disable
> errortrace mode in `profile-thunk`.
> 
> The errortrace mode requires the use of the errortrace compile-handler,
> without which there's nothing for the profiler to observe.
> 
> `raco profile --use-errortrace` sets it, as does `racket -l errortrace
> -t places-profile.rkt`. However, neither of those work on your example.
> 
> Could places be interfering with the compile-handler?
> 

True, I can confirm that. I will open an issue on this. I have no idea
how the internals of these things work so not sure what could be
happening here. Maybe Matthew knows?

-- 
Paulo Matos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to