diff --git a/lib/trace/trace_rpc.c b/lib/trace/trace_rpc.c index eb0527a396..83b6d410b9 100644 --- a/lib/trace/trace_rpc.c +++ b/lib/trace/trace_rpc.c @@ -125,8 +125,8 @@ SPDK_RPC_REGISTER("trace_disable_tpoint_group", spdk_rpc_trace_disable_tpoint_gr SPDK_RPC_REGISTER_ALIAS_DEPRECATED(trace_disable_tpoint_group, disable_tpoint_group) static void -spdk_rpc_get_tpoint_group_mask(struct spdk_jsonrpc_request *request, - const struct spdk_json_val *params) +spdk_rpc_trace_get_tpoint_group_mask(struct spdk_jsonrpc_request *request, + const struct spdk_json_val *params) { uint64_t tpoint_group_mask; char mask_str[7]; @@ -136,7 +136,7 @@ spdk_rpc_get_tpoint_group_mask(struct spdk_jsonrpc_request *request, if (params != NULL) { spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS, - "get_tpoint_group_mask requires no parameters"); + "trace_get_tpoint_group_mask requires no parameters"); return; } @@ -165,5 +165,6 @@ spdk_rpc_get_tpoint_group_mask(struct spdk_jsonrpc_request *request, spdk_json_write_object_end(w); spdk_jsonrpc_end_result(request, w); } -SPDK_RPC_REGISTER("get_tpoint_group_mask", spdk_rpc_get_tpoint_group_mask, +SPDK_RPC_REGISTER("trace_get_tpoint_group_mask", spdk_rpc_trace_get_tpoint_group_mask, SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME) +SPDK_RPC_REGISTER_ALIAS_DEPRECATED(trace_get_tpoint_group_mask, get_tpoint_group_mask) diff --git a/scripts/rpc.py b/scripts/rpc.py index 86141b5d04..2f67354e75 100755 --- a/scripts/rpc.py +++ b/scripts/rpc.py @@ -1167,11 +1167,12 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse (for example "bdev" for bdev trace group, "all" for all trace groups).""") p.set_defaults(func=trace_disable_tpoint_group) - def get_tpoint_group_mask(args): - print_dict(rpc.trace.get_tpoint_group_mask(args.client)) + def trace_get_tpoint_group_mask(args): + print_dict(rpc.trace.trace_get_tpoint_group_mask(args.client)) - p = subparsers.add_parser('get_tpoint_group_mask', help='get trace point group mask') - p.set_defaults(func=get_tpoint_group_mask) + p = subparsers.add_parser('trace_get_tpoint_group_mask', aliases=['get_tpoint_group_mask'], + help='get trace point group mask') + p.set_defaults(func=trace_get_tpoint_group_mask) # log def log_set_flag(args): diff --git a/scripts/rpc/trace.py b/scripts/rpc/trace.py index e00c29505d..60667b5e8a 100644 --- a/scripts/rpc/trace.py +++ b/scripts/rpc/trace.py @@ -23,10 +23,11 @@ def trace_disable_tpoint_group(client, name): return client.call('trace_disable_tpoint_group', params) -def get_tpoint_group_mask(client): +@deprecated_alias('get_tpoint_group_mask') +def trace_get_tpoint_group_mask(client): """Get trace point group mask Returns: List of trace point group mask """ - return client.call('get_tpoint_group_mask') + return client.call('trace_get_tpoint_group_mask')