diff options
author | Ryan Blue <blue@apache.org> | 2016-11-02 00:08:30 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-11-02 00:08:30 -0700 |
commit | 2dc048081668665f85623839d5f663b402e42555 (patch) | |
tree | 19a6cc009b1dcd8b317a951b7ad6ba6cd8e232bd /core/src/main/resources | |
parent | 85c5424d466f4a5765c825e0e2ab30da97611285 (diff) | |
download | spark-2dc048081668665f85623839d5f663b402e42555.tar.gz spark-2dc048081668665f85623839d5f663b402e42555.tar.bz2 spark-2dc048081668665f85623839d5f663b402e42555.zip |
[SPARK-17532] Add lock debugging info to thread dumps.
## What changes were proposed in this pull request?
This adds information to the web UI thread dump page about the JVM locks
held by threads and the locks that threads are blocked waiting to
acquire. This should help find cases where lock contention is causing
Spark applications to run slowly.
## How was this patch tested?
Tested by applying this patch and viewing the change in the web UI.
![thread-lock-info](https://cloud.githubusercontent.com/assets/87915/18493057/6e5da870-79c3-11e6-8c20-f54c18a37544.png)
Additions:
- A "Thread Locking" column with the locks held by the thread or that are blocking the thread
- Links from the a blocked thread to the thread holding the lock
- Stack frames show where threads are inside `synchronized` blocks, "holding Monitor(...)"
Author: Ryan Blue <blue@apache.org>
Closes #15088 from rdblue/SPARK-17532-add-thread-lock-info.
Diffstat (limited to 'core/src/main/resources')
-rw-r--r-- | core/src/main/resources/org/apache/spark/ui/static/table.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/resources/org/apache/spark/ui/static/table.js b/core/src/main/resources/org/apache/spark/ui/static/table.js index 14b06bfe86..0315ebf5c4 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/table.js +++ b/core/src/main/resources/org/apache/spark/ui/static/table.js @@ -36,7 +36,7 @@ function toggleThreadStackTrace(threadId, forceAdd) { if (stackTrace.length == 0) { var stackTraceText = $('#' + threadId + "_td_stacktrace").html() var threadCell = $("#thread_" + threadId + "_tr") - threadCell.after("<tr id=\"" + threadId +"_stacktrace\" class=\"accordion-body\"><td colspan=\"3\"><pre>" + + threadCell.after("<tr id=\"" + threadId +"_stacktrace\" class=\"accordion-body\"><td colspan=\"4\"><pre>" + stackTraceText + "</pre></td></tr>") } else { if (!forceAdd) { @@ -73,6 +73,7 @@ function onMouseOverAndOut(threadId) { $("#" + threadId + "_td_id").toggleClass("threaddump-td-mouseover"); $("#" + threadId + "_td_name").toggleClass("threaddump-td-mouseover"); $("#" + threadId + "_td_state").toggleClass("threaddump-td-mouseover"); + $("#" + threadId + "_td_locking").toggleClass("threaddump-td-mouseover"); } function onSearchStringChange() { |