osd/osd_types: add blocked_by to pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: populate pg_stats_t blocked_by

Keep a PG member for OSDs that current block us, and fill it into the
stats struct when we publish.  Use a vector<int> in pg_stats_t to limit the
overhead (memory, decoding) on this list once it is static.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/OSDMonitor: clean up 'osd perf' command placement

This doesn't need an OSDMap; move it out of that block.

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: s/osdid/osd/ in 'osd perf' plaintext heading

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by during peering GetInfo

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by during peering GetLog

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in Incomplete state

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: set blocked_by in GetMissing

Signed-off-by: Sage Weil <sage@redhat.com>
mon/PGMap: track histogram of pg blocked_by

Signed-off-by: Sage Weil <sage@redhat.com>
mon: add 'osd blocked-by' command

Print a histogram of how many peers are blocked by each OSD.  This is
useful for quickly diagnosing which OSDs are broken or slow and preventing
peering from completing.

In the future, we can populate the pg_stat_t with peer OSDs for more than
just peering waits, but this is a useful start.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add simple 'ceph osd perf' test

Signed-off-by: Sage Weil <sage@redhat.com>
qa/workunits/cephtool: add trivial 'ceph osd blocked-by' test

Signed-off-by: Sage Weil <sage@redhat.com>
osd/PG: bound number of blocked_by OSDs we report per PG

We don't want to include an unbounded-sized vector of OSDs in the pg_stat_t
struct.  Cap it, and report a random subset of the actual blockers to fit
within the limit.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: s/int/int32_t/ in pg_stat_t

Signed-off-by: Sage Weil <sage@redhat.com>
tracing: bootstrap lttng-ust with mutex events

See src/tracing/README.md

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: trace mutex::unlock

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: add pg and osd tracepoints

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: Check for lttng/tracepoint.h when configuring
tracing: automake-ify tracepoint generation

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: Trace OpRequest

Signed-off-by: Adam Crume <adamcrume@gmail.com>