Profiler not reporting memory allocated by Threads

Is the Profiler only showing the memory allocated on the main thread ? BeginSample() shows less memory and even the overall is less when the methods are moved inside local lambdas.

So DoSomething() reports 1GB, but DoSomething(){ do_something_using_threads();} shows 0.5GB for example.

(I am referring to the GC Alloc column)

Thanks.

The GC.Alloc column of the Hierarchy view in the CPU Usage Profiler module shows the GC allocated in the selected frame and thread. On versions pre 2019.3, that would always be the main thread. On versions >= 2019.3 there is a drop-down to select the thread the Hierarchy should show data for. In timeline view, GC.Alloc samples are bright magenta and you can see all threads next to each other.
The Memory Profiler Module’s GC Allocated in frame shows all memory allocated over all threads in this frame.

I found the threads under Timeline–>Scripting Threads when CPU Usage tab is selected. Very nice display. However for Memory Usage tab not much is shown.

So currently there is no way to summarize the total memory sampled by BeginSample()/EndSample() if that runs on different threads, right ?

No, though there are some ideas of doing that with Profile Analyzer, no plans or eTA on that yet.

BTW, If your on 2019.4 or up, you could probably modify the script I posted here to use HierarchyFrameDataView and calculate an overview for yourself in the mean time.