Skip to content

Commit decdc40

Browse files
Arumugam Kolappanvijay-suman
authored andcommitted
rds: Provision to allow all trace points at module load time
By default, the RDS module is enabled to print only a subset of trace prints during module load time. By setting flag 'RDS_RTD_ALL' in 'rds_rt_debug_bitmap' module param, this patch allows the user to enable all the logs at module load time. Note: If debug level is changed without 'RDS_RTD_ALL' bit, then it will first disable all RDS trace points and enable only bits given in the new debug bitmap. Orabug: 35916076 Signed-off-by: Arumugam Kolappan <[email protected]> Reviewed-by: Alan Maguire <[email protected]> Reviewed-by: Håkon Bugge <[email protected]>
1 parent 9be55cf commit decdc40

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

net/rds/af_rds.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,21 @@ static struct rt_debug_tp rt_debug_tp_map[] = {
118118
"rds_ib_flow_cntrl_advertise_credits", NULL }},
119119
{ RDS_RTD_RDMA_IB,
120120
{ "rds_ib_add_device", "rds_ib_remove_device", NULL }},
121+
{ RDS_RTD_ALL,
122+
{ NULL } },
121123
};
122124

123125
/* Enable all tracepoints associated with RDS_RTD_ flags that are set. */
124126
void rds_rt_debug_tp_enable(void)
125127
{
126128
int enable, i, j;
127129

130+
if (kernel_rds_rt_debug_bitmap & RDS_RTD_ALL) {
131+
trace_set_clr_event("rds", NULL, 1);
132+
return;
133+
}
134+
135+
trace_set_clr_event("rds", NULL, 0);
128136
for (i = 0; i < ARRAY_SIZE(rt_debug_tp_map); i++) {
129137
enable = (kernel_rds_rt_debug_bitmap &
130138
rt_debug_tp_map[i].flag) != 0;

net/rds/rds.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ enum {
9393

9494
/* bit 20 ~ 31 are module specific bits */
9595
RDS_RTD_RDMA_IB = 1 << 23, /* 0x800000 */
96+
RDS_RTD_ALL = 1 << 31, /* Enable All */
9697
};
9798

9899
/* XXX is there one of these somewhere? */

0 commit comments

Comments
 (0)