DescriptionOn embedded Linux devices the amount of persistent store is usually very limited. In many cases, and to prevent flash memory wear, persistent store is implemented as a small RAM drive that gets commited to storage after a vendor specified interval has passed. Because of this it's necessary to let the user control which Minidump streams is interested in, to avoid the current "huge" ~300-350Kb minidump files. To achieve that I have added a ContentFlags bitwise enum (which defaults to DUMP_ALL, so the there are no changes if the user doesn't set any flags) that controls what is written (decoupling the Thread List, so it's possible to only write the crashing thread info) and also if a forced stack limit is set (which unconditionally limits the stack, instead of the current behavior of only doing it if more than 20 threads are running and a file limit is set on the MinidumpDescriptor). The ContentFlags are set from the MinidumpDescriptor class. enum ContentFlags { DUMP_CRASH_THREAD = (1 << 0), // Dump the crashing thread DUMP_ADDITIONAL_THREADS = (1 << 1), // Dump the other threads DUMP_LIMIT_STACK_SIZE = (1 << 2), // Limit the stack size DUMP_MAPPINGS = (1 << 3), DUMP_APP_MEMORY = (1 << 4), DUMP_MEMORY_LIST = (1 << 5), DUMP_EXCEPTION = (1 << 6), DUMP_SYSTEM_INFO = (1 << 7), DUMP_LINUX_CPU_INFO = (1 << 8), DUMP_LINUX_PROC_STATUS = (1 << 9), DUMP_LINUX_LSB_RELEASE = (1 << 10), DUMP_LINUX_CMD_LINE = (1 << 11), DUMP_LINUX_ENVIRON = (1 << 12), DUMP_LINUX_AUXV = (1 << 13), DUMP_LINUX_MAPS = (1 << 14), DUMP_LINUX_DSO_DEBUG = (1 << 15), DUMP_ALL = -1 & ~(DUMP_LIMIT_STACK_SIZE) }; Patch Set 1 #
Total comments: 9
Patch Set 2 : Moved content flags from MinidumpDescriptor to ExceptionHandler. Added content presets and unit tes… #
Total comments: 8
Patch Set 3 : Build against the latest code and address all review issues. Add a way to control the maximum threa… #
MessagesTotal messages: 18
|