Toolkit for thread and heap dumping