lockstat {
    all
    percaller
    detail
}

/*
 * lockstat.all: instances are "lockname"
 * aggregated for all cpus and callers
 */
lockstat.all {
    time
    count
}

lockstat.all.time {
    wait	LOCKSTAT:0:0
    hold	LOCKSTAT:0:1
    max_wait	LOCKSTAT:0:2
    max_hold	LOCKSTAT:0:3
}

lockstat.all.count {
    spin	LOCKSTAT:0:4
    nowait	LOCKSTAT:0:5
}

/*
 * lockstat.percaller: instances are "lockname:caller"
 * aggregated for all cpus
 */
lockstat.percaller {
    time
    count
}

lockstat.percaller.time {
    wait	LOCKSTAT:1:0
    hold	LOCKSTAT:1:1
    max_wait	LOCKSTAT:1:2
    max_hold	LOCKSTAT:1:3
}

lockstat.percaller.count {
    spin	LOCKSTAT:1:4
    nowait	LOCKSTAT:1:5
}


/*
 * lockstat.detail: instances are "lockname:caller:cpu"
 * (with no aggregation)
 */
lockstat.detail {
    time
    count
}

lockstat.detail.time {
    wait	LOCKSTAT:2:0
    hold	LOCKSTAT:2:1
    max_wait	LOCKSTAT:2:2
    max_hold	LOCKSTAT:2:3
}

lockstat.detail.count {
    spin	LOCKSTAT:2:4
    nowait	LOCKSTAT:2:5
}
