Dmp memory file can be resized after creation?

I feel lazy asking this, but I can't seem to trigger the correct Google query to find the answers to the question (s) I have.

A bit of background. I have an application that will monitor other processes for unhandled exceptions and crashes, etc. When launched, this application collects system information and creates a memory.dmp file using MiniDumpWriteDump.

Now we would like this process monitor application to upload crash data to the server, but obviously the memory.dmp files can be massive, this is not desirable to load. So we find that we can either reduce the size of memory.dmp when we create it (potentially make memory.dmp useless if we don't include this vital bit of information), or end up having to download massive files.

Anyway, after we have created the memory.dmp, it can be opened, some initial analysis is done (I know this bit is possible), and any bits of the .dmp memory are considered not useful, removed / edited (and less copy of memory.dmp loaded)?

By "bits" of memory .dmp I mean, for example. Removing descriptor data or information about unloaded modules. See enumeration MINIDUMP_TYPE

+3


source to share


1 answer


Go with Lieven Kirsmeiers . In fact, you want to save as much data as possible in the dump for later analysis, so if you need to collapse the dump, do it first.

To more accurately answer the question ...

If the compression isn't enough, there is a little known trick for shrinking the dump file, the only mention of which is in the documentation here .



Pruning an existing dump file

CDB and WinDbg can also be used to compress the dump file. To do this, start debugging an existing dump file and then use the .dump command to create a smaller dump file.

So, if you have a dump file with .dump /ma

, you can compress it by opening that dump file and using .dump /mhi

. Choose the minidump option that gives you the best compromise on usability and size. Option i

is a good choice for injecting only the heap memory that the stack refers to.

Caveat: your mileage may vary depending on this technique. With 32 bit dumps, I've always worked with this trick. The 64 bit dumps did a little bit for me and completely ignored the minidump options I went through.

+5


source







All Articles