...regarding kernel-land FBT tracing and teasing info from pointers passed as an argument to a function.
Long story short, I'm trying to get to the bottom of an issue I'm having with the nxge driver and have keyed in on the following function: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/nxge/nxge_mac.c#nxge_mdio_read I'd like to tease out, somehow, the contents of the last arg of that function, the pointer to "value". This is new territory for me, so I'm a bit in need of a sanity check. Am I trying to attain the unattainable or am I just doing it wrong? TIA /dale My script so far is thus: #!/usr/sbin/dtrace -qCs #pragma D option switchrate=10hz /* Definitions of BCM8704 */ #define BCM8704_PHYXS_XGXS_LANE_STATUS_REG 0x18 #define BCM8704_10GBASE_R_PCS_STATUS_REG 0x20 #define BCM8704_PMD_RECEIVE_SIG_DETECT 0xa /* XGXS Lane Status Register (Dev = 4, Register Address = 0x0018) */ #define XGXS_LANE_ALIGN_STATUS 0x1000 #define XGXS_PATTERN_TEST_ABILITY 0x0800 #define XGXS_LANE3_SYNC 0x0008 #define XGXS_LANE2_SYNC 0x0004 #define XGXS_LANE1_SYNC 0x0002 #define XGXS_LANE0_SYNC 0x0001 #define XGXS_LANE_STAT_MAGIC 0x0400 /* PMD Receive Signal Detect Register (Dev = 1 Register Address = 0x000A) */ #define GLOB_PMD_RX_SIG_OK 0x01 /* 10GBase-R PCS Status Register (Dev = 3, Register Address = 0x0020) */ #define PCS_10GBASE_R_PCS_BLK_LOCK 0x0001 #define ENTRY_PROBE fbt:nxge:nxge_mdio_read:entry BEGIN { nxge_register[0x18] = "BCM8704_PHYXS_XGXS_LANE_STATUS_REG"; nxge_register[0x20] = "BCM8704_10GBASE_R_PCS_STATUS_REG"; nxge_register[0xa] = "BCM8704_PMD_RECEIVE_SIG_DETECT"; } ENTRY_PROBE { self->nxge = (struct _nxge_t *)arg0; self->reg = (uint16_t)arg3; self->value = (uint16_t)arg4; } ENTRY_PROBE / self->reg == BCM8704_PMD_RECEIVE_SIG_DETECT / { printf("\n"); printf("nxge%d: %s(%s) value = %s\n", self->nxge->instance, probefunc, nxge_register[self->reg] != 0 ? nxge_register[self->reg] : "unknown", (self->value = GLOB_PMD_RX_SIG_OK) != 0 ? "TRUE" : "FALSE"); } ENTRY_PROBE / self->reg == BCM8704_10GBASE_R_PCS_STATUS_REG / { printf("nxge%d: %s(%s) value = %s\n", self->nxge->instance, probefunc, nxge_register[self->reg] != 0 ? nxge_register[self->reg] : "unknown", (self->value = PCS_10GBASE_R_PCS_BLK_LOCK) ? "TRUE" : "FALSE"); } ENTRY_PROBE / self->reg == BCM8704_PHYXS_XGXS_LANE_STATUS_REG / { printf("nxge%d: %s(%s) value = %s\n", self->nxge->instance, probefunc, nxge_register[self->reg] != 0 ? nxge_register[self->reg] : "unknown", (self->value = (XGXS_LANE_ALIGN_STATUS | XGXS_LANE3_SYNC | XGXS_LANE2_SYNC | XGXS_LANE1_SYNC | XGXS_LANE0_SYNC | 0x400)) ? "TRUE" : "FALSE"); } _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org