private String dumpThreadInfo(Thread thread, StackTraceElement[] stackTrace, StringBuilder sb) {
		sb.append('\"').append(thread.getName()).append("\" Id=").append(thread.getId()).append(' ')
				.append(thread.getState());
		sb.append('\n');
		int i = 0;
		for (; i < Math.min(maxStackLevel, stackTrace.length); i++) {
			StackTraceElement ste = stackTrace[i];
			sb.append("\tat ").append(ste).append('\n');
		}
		if (i < stackTrace.length) {
			sb.append("\t...").append('\n');
		}

		sb.append('\n');
		return sb.toString();
	}
private String dumpThreadInfo ( Thread thread , StackTraceElement [ ] stackTrace , StringBuilder sb ) { sb . append ( '\"' ) . append ( thread . getName ( ) ) . append ( "\" Id=" ) . append ( thread . getId ( ) ) . append ( ' ' ) . append ( thread . getState ( ) ) ; sb . append ( '\n' ) ; int i = 0 ; for ( ; i < Math . min ( maxStackLevel , stackTrace . length ) ; i ++ ) { StackTraceElement ste = stackTrace [ i ] ; sb . append ( "\tat " ) . append ( ste ) . append ( '\n' ) ; } if ( i < stackTrace . length ) { sb . append ( "\t..." ) . append ( '\n' ) ; } sb . append ( '\n' ) ; return sb . toString ( ) ; }
打印全部的stack，重新实现threadInfo的toString()函数，因为默认最多只打印8层的stack. 同时，不再打印lockedMonitors和lockedSynchronizers.