This is a java thread-dump viewer. It provides a master-details view of a thread dump(s) with ability to filter interesting threads and to hide uninteresting ones.
Add the following to your init.el:
(require 'package) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (package-initialize)
(when (not (package-installed-p 'thread-dump)) (package-install 'thread-dump))
There are 2 entry points to the viewer:
creates a viewer for directory with thread dumps,
thread-dump-open-file creates a viewer for given file.
If you use dired the following code might be useful:
(defun thread-dump-open-dired-dir () (interactive) (thread-dump-open-dir (dired-current-directory)))
(defun thread-dump-open-marked-files () (interactive) (let ((files (dired-get-marked-files))) (thread-dump-open-files files)))
(add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "C-c t d") 'thread-dump-open-dired-dir) (define-key dired-mode-map (kbd "C-c t f") 'thread-dump-open-marked-files)))
It adds 2 keybindings to dired-mode:
C-c t d opens a viewer for
current dired directory and
C-c t f opens a viewer for selected
files or, if no files selected, for file under the cursor.
You can use
p) for navigation between
threads in the master view on the left.
o open thread
under cursor and switch to the thread buffer,
v only shows a
thread without leaving the master buffer.
h to hide a single thread and
H to hide all the threads
with the same stacktrace as in thread under cursor. To reset hidden
/ and type a word to add a filter, viewer will show only the
threads matched by the filter.
/ RET resets a filter.
If you run a viewer for several files, use
P to view next
and previous thread dump. Filters and hidden threads are preserved
between thread dumps.
q to leave thread-dump viewer.