public void debugDump(StringBuilder sb) {
    if (profiling) {
      sb.append("\n\t\tLocks: [");
      for (ProfiledLock lock : profiledLocks) {
        sb.append("\n\t\t\t").append(lock.getLabel())
          .append(lock)
          .append(" waited: ").append(lock.getTimeSpentWaitingForLock())
          .append(" held: ").append(lock.getTimeSpentLocked())
          .append(" times locked: ").append(lock.getLockCount());
      }
      if (!profiledLocks.isEmpty()) {
        sb.append("\n");
      }
      sb.append("]");
    }
  }
If lock profiling is enabled, append summary statistics about lock usage to <code>sb</code>
@param sb the buffer to append the statistics to
ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java