Re: Extending /proc/*/maps

2011-05-11 Thread Corinna Vinschen
Hi Ryan, On May 11 01:27, Ryan Johnson wrote: Hi all, Please find attached three patches which extend the functionality of /proc/*/maps. Thanks! I applied youyr two first patches with a couple of changes: - Formatting: Setting of curly braces in class and method defintions, a lot of

Re: Extending /proc/*/maps

2011-05-11 Thread Corinna Vinschen
On May 11 01:27, Ryan Johnson wrote: The second (proc-maps-heaps) adds reporting of Windows heaps (or their bases, at least). Unfortunately there doesn't seem to be any efficient way to identify all virtual allocations which a heap owns. There's a call RtlQueryDebugInformation which can fetch

Re: Extending /proc/*/maps

2011-05-11 Thread Ryan Johnson
On 11/05/2011 6:31 AM, Corinna Vinschen wrote: Hi Ryan, On May 11 01:27, Ryan Johnson wrote: Hi all, Please find attached three patches which extend the functionality of /proc/*/maps. Thanks! I applied youyr two first patches with a couple of changes: - Formatting: Setting of curly braces

Re: Extending /proc/*/maps

2011-05-11 Thread Ryan Johnson
On 11/05/2011 9:20 AM, Corinna Vinschen wrote: On May 11 08:53, Ryan Johnson wrote: On 11/05/2011 6:31 AM, Corinna Vinschen wrote: - I replaced the call to GetMappedFileNameEx with a call to NtQueryVirtualMemory (MemorySectionName). This avoids to add another dependency to psapi. I

Re: Improvements to fork handling

2011-05-11 Thread Ryan Johnson
On 11/05/2011 10:13 AM, Christopher Faylor wrote: On Wed, May 11, 2011 at 09:59:53AM +0200, Corinna Vinschen wrote: On May 11 02:18, Ryan Johnson wrote: Please find attached five patches [...] Oops, wrong mailing list... Btw., it would be nice if you could create patches with the diff -p

Re: Extending /proc/*/maps

2011-05-11 Thread Ryan Johnson
On 11/05/2011 7:14 AM, Corinna Vinschen wrote: On May 11 01:27, Ryan Johnson wrote: The second (proc-maps-heaps) adds reporting of Windows heaps (or their bases, at least). Unfortunately there doesn't seem to be any efficient way to identify all virtual allocations which a heap owns. There's a

Improvements to fork handling (1/5)

2011-05-11 Thread Ryan Johnson
Hi all, This is the first of a series of patches, sent in separate emails as requested. The first patch allows a child which failed due to address space clobbers to report cleanly back to the parent. As a result, DLL_LINK which land wrong, DLL_LOAD whose space gets clobbered, and failure to

Improvements to fork handling (2/5)

2011-05-11 Thread Ryan Johnson
Hi all, This patch has the parent sort its dll list topologically by dependencies. Previously, attempts to load a DLL_LOAD dll risked pulling in dependencies automatically, and the latter would then not benefit from the code which encourages them to land in the right places. The dependency

Improvements to fork handling (3/5)

2011-05-11 Thread Ryan Johnson
Hi all, This patch fixes a bug in the reserve_at function which caused it to sometimes reserve space needed by the dll it was supposed to help land. This happens when the dll tries to land in a free region which overlaps the desired location. The new code exploits the image introspection

Improvements to fork handling (4/5)

2011-05-11 Thread Ryan Johnson
Hi all, This patch rewrites dll_list::load_after fork. The new version eliminates reserve_upto() and release_upto(), which were expensive (the process repeats for each dll) and buggy (release_upto could free allocations reserve_upto did not make). Instead, the effect of reserve_upto is

Improvements to fork handling (5/5)

2011-05-11 Thread Ryan Johnson
Hi all, This last patch adds a small optimization which reserves the lower 4MB of address space early in the process's lifetime (even if it's not a forkee). This was motivated by the observation that Windows tends to move things around a lot in that area, increasing the probability of future

Re: Improvements to fork handling

2011-05-11 Thread Ryan Johnson
On 11/05/2011 12:16 PM, Christopher Faylor wrote: On Wed, May 11, 2011 at 10:21:14AM -0400, Ryan Johnson wrote: On 11/05/2011 10:13 AM, Christopher Faylor wrote: On Wed, May 11, 2011 at 09:59:53AM +0200, Corinna Vinschen wrote: On May 11 02:18, Ryan Johnson wrote: Please find attached five

Re: Extending /proc/*/maps

2011-05-11 Thread Corinna Vinschen
On May 11 13:46, Ryan Johnson wrote: On 11/05/2011 7:14 AM, Corinna Vinschen wrote: On May 11 01:27, Ryan Johnson wrote: The second (proc-maps-heaps) adds reporting of Windows heaps (or their bases, at least). Unfortunately there doesn't seem to be any efficient way to identify all virtual

Re: [PATCH] Fix /proc/meminfo and /proc/swaps for 4GB

2011-05-11 Thread Yaakov (Cygwin/X)
On Mon, 2011-05-09 at 09:55 +0200, Corinna Vinschen wrote: I'm not sure I understand this new format. Why do you keep the Mem: and Swap: lines? Linux doesn't have them and top appears to work without them. And then, why do you print MemShared, HighTotal, and HighFree, even though they are