1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright (C) 2018 Intel Corporation. 3# All rights reserved. 4 5 6def trace_enable_tpoint_group(client, name): 7 """Enable trace on a specific tpoint group. 8 9 Args: 10 name: trace group name we want to enable in tpoint_group_mask. (for example "bdev"). 11 """ 12 params = {'name': name} 13 return client.call('trace_enable_tpoint_group', params) 14 15 16def trace_disable_tpoint_group(client, name): 17 """Disable trace on a specific tpoint group. 18 19 Args: 20 name: trace group name we want to disable in tpoint_group_mask. (for example "bdev"). 21 """ 22 params = {'name': name} 23 return client.call('trace_disable_tpoint_group', params) 24 25 26def trace_set_tpoint_mask(client, name, tpoint_mask): 27 """Enable tracepoint mask on a specific tpoint group. 28 29 Args: 30 name: trace group name we want to enable in tpoint_group_mask. (for example "bdev"). 31 tpoint_mask: tracepoints to be enabled inside decleared group 32 (for example "0x3" to enable first two tpoints). 33 """ 34 params = {'name': name, 'tpoint_mask': tpoint_mask} 35 return client.call('trace_set_tpoint_mask', params) 36 37 38def trace_clear_tpoint_mask(client, name, tpoint_mask): 39 """Disable tracepoint mask on a specific tpoint group. 40 41 Args: 42 name: trace group name we want to disable in tpoint_group_mask. (for example "bdev"). 43 tpoint_mask: tracepoints to be disabled inside decleared group 44 (for example "0x3" to disable first two tpoints). 45 """ 46 params = {'name': name, 'tpoint_mask': tpoint_mask} 47 return client.call('trace_clear_tpoint_mask', params) 48 49 50def trace_get_tpoint_group_mask(client): 51 """Get trace point group mask 52 53 Returns: 54 List of trace point group mask 55 """ 56 return client.call('trace_get_tpoint_group_mask') 57 58 59def trace_get_info(client): 60 """Get name of shared memory file and list of the available trace point groups 61 62 Returns: 63 Name of shared memory file and list of the available trace point groups 64 """ 65 return client.call('trace_get_info') 66