Skip to content

Instantly share code, notes, and snippets.

@sdimitro
Created April 13, 2018 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sdimitro/4eac9894d4a109ad5774d0e3b07f20a0 to your computer and use it in GitHub Desktop.
Save sdimitro/4eac9894d4a109ad5774d0e3b07f20a0 to your computer and use it in GitHub Desktop.
#!/usr/sbin/dtrace -Cs
#pragma D option quiet
spa_t *spa;
vdev_queue_pending_remove:entry
/!spa && stringof(args[1]->io_spa->spa_name) == $$1/
{
spa = args[1]->io_spa;
}
txg_kick:entry
/args[0]->dp_spa == spa/
{
self->t = 1;
self->dp = args[0];
}
cv_broadcast:entry
/callers["txg_kick"] && self->dp != NULL/
{
printf("=== txg_kick() broadcast ===\n");
printf("tx_open = %u\n", self->dp->dp_tx.tx_open_txg);
printf("tx_quiesced_txg = %u\n", self->dp->dp_tx.tx_quiesced_txg);
printf("tx_syncing_txg = %u\n", self->dp->dp_tx.tx_syncing_txg);
printf("tx_synced_txg = %u\n", self->dp->dp_tx.tx_synced_txg);
printf("tx_sync_txg_waiting = %u\n", self->dp->dp_tx.tx_sync_txg_waiting);
printf("tx_quiesce_txg_waiting = %u\n", self->dp->dp_tx.tx_quiesce_txg_waiting);
printf("timestamp = %u\n", timestamp);
printf("============================\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment