Lines Matching +full:static +full:- +full:config
2 * Copyright (c) 2014-2019, Intel Corporation
34 #include "intel-pt.h"
43 struct pt_config config; member
50 static struct ptunit_result sfix_init(struct sync_fixture *sfix) in sfix_init()
52 memset(sfix->buffer, 0xcd, sizeof(sfix->buffer)); in sfix_init()
54 memset(&sfix->config, 0, sizeof(sfix->config)); in sfix_init()
55 sfix->config.size = sizeof(sfix->config); in sfix_init()
56 sfix->config.begin = sfix->buffer; in sfix_init()
57 sfix->config.end = sfix->buffer + sizeof(sfix->buffer); in sfix_init()
62 static void sfix_encode_psb(uint8_t *pos) in sfix_encode_psb()
76 static struct ptunit_result sync_fwd_null(struct sync_fixture *sfix) in sync_fwd_null()
81 errcode = pt_sync_forward(NULL, sfix->config.begin, &sfix->config); in sync_fwd_null()
82 ptu_int_eq(errcode, -pte_internal); in sync_fwd_null()
84 errcode = pt_sync_forward(&sync, NULL, &sfix->config); in sync_fwd_null()
85 ptu_int_eq(errcode, -pte_internal); in sync_fwd_null()
87 errcode = pt_sync_forward(&sync, sfix->config.begin, NULL); in sync_fwd_null()
88 ptu_int_eq(errcode, -pte_internal); in sync_fwd_null()
93 static struct ptunit_result sync_bwd_null(struct sync_fixture *sfix) in sync_bwd_null()
98 errcode = pt_sync_backward(NULL, sfix->config.begin, &sfix->config); in sync_bwd_null()
99 ptu_int_eq(errcode, -pte_internal); in sync_bwd_null()
101 errcode = pt_sync_backward(&sync, NULL, &sfix->config); in sync_bwd_null()
102 ptu_int_eq(errcode, -pte_internal); in sync_bwd_null()
104 errcode = pt_sync_backward(&sync, sfix->config.begin, NULL); in sync_bwd_null()
105 ptu_int_eq(errcode, -pte_internal); in sync_bwd_null()
110 static struct ptunit_result sync_fwd_empty(struct sync_fixture *sfix) in sync_fwd_empty()
115 sfix->config.end = sfix->config.begin; in sync_fwd_empty()
117 errcode = pt_sync_forward(&sync, sfix->config.begin, &sfix->config); in sync_fwd_empty()
118 ptu_int_eq(errcode, -pte_eos); in sync_fwd_empty()
123 static struct ptunit_result sync_bwd_empty(struct sync_fixture *sfix) in sync_bwd_empty()
128 sfix->config.end = sfix->config.begin; in sync_bwd_empty()
130 errcode = pt_sync_backward(&sync, sfix->config.end, &sfix->config); in sync_bwd_empty()
131 ptu_int_eq(errcode, -pte_eos); in sync_bwd_empty()
136 static struct ptunit_result sync_fwd_none(struct sync_fixture *sfix) in sync_fwd_none()
141 errcode = pt_sync_forward(&sync, sfix->config.begin, &sfix->config); in sync_fwd_none()
142 ptu_int_eq(errcode, -pte_eos); in sync_fwd_none()
147 static struct ptunit_result sync_bwd_none(struct sync_fixture *sfix) in sync_bwd_none()
152 errcode = pt_sync_backward(&sync, sfix->config.end, &sfix->config); in sync_bwd_none()
153 ptu_int_eq(errcode, -pte_eos); in sync_bwd_none()
158 static struct ptunit_result sync_fwd_here(struct sync_fixture *sfix) in sync_fwd_here()
163 sfix_encode_psb(sfix->config.begin); in sync_fwd_here()
165 errcode = pt_sync_forward(&sync, sfix->config.begin, &sfix->config); in sync_fwd_here()
167 ptu_ptr_eq(sync, sfix->config.begin); in sync_fwd_here()
172 static struct ptunit_result sync_bwd_here(struct sync_fixture *sfix) in sync_bwd_here()
177 sfix_encode_psb(sfix->config.end - ptps_psb); in sync_bwd_here()
179 errcode = pt_sync_backward(&sync, sfix->config.end, &sfix->config); in sync_bwd_here()
181 ptu_ptr_eq(sync, sfix->config.end - ptps_psb); in sync_bwd_here()
186 static struct ptunit_result sync_fwd(struct sync_fixture *sfix) in sync_fwd()
191 sfix_encode_psb(sfix->config.begin + 0x23); in sync_fwd()
193 errcode = pt_sync_forward(&sync, sfix->config.begin, &sfix->config); in sync_fwd()
195 ptu_ptr_eq(sync, sfix->config.begin + 0x23); in sync_fwd()
200 static struct ptunit_result sync_bwd(struct sync_fixture *sfix) in sync_bwd()
205 sfix_encode_psb(sfix->config.begin + 0x23); in sync_bwd()
207 errcode = pt_sync_backward(&sync, sfix->config.end, &sfix->config); in sync_bwd()
209 ptu_ptr_eq(sync, sfix->config.begin + 0x23); in sync_bwd()
214 static struct ptunit_result sync_fwd_past(struct sync_fixture *sfix) in sync_fwd_past()
219 sfix_encode_psb(sfix->config.begin); in sync_fwd_past()
221 errcode = pt_sync_forward(&sync, sfix->config.begin + ptps_psb, in sync_fwd_past()
222 &sfix->config); in sync_fwd_past()
223 ptu_int_eq(errcode, -pte_eos); in sync_fwd_past()
228 static struct ptunit_result sync_bwd_past(struct sync_fixture *sfix) in sync_bwd_past()
233 sfix_encode_psb(sfix->config.end - ptps_psb); in sync_bwd_past()
235 errcode = pt_sync_backward(&sync, sfix->config.end - ptps_psb, in sync_bwd_past()
236 &sfix->config); in sync_bwd_past()
237 ptu_int_eq(errcode, -pte_eos); in sync_bwd_past()
242 static struct ptunit_result sync_fwd_cutoff(struct sync_fixture *sfix) in sync_fwd_cutoff()
247 sfix_encode_psb(sfix->config.begin); in sync_fwd_cutoff()
248 sfix_encode_psb(sfix->config.end - ptps_psb); in sync_fwd_cutoff()
249 sfix->config.begin += 1; in sync_fwd_cutoff()
250 sfix->config.end -= 1; in sync_fwd_cutoff()
252 errcode = pt_sync_forward(&sync, sfix->config.begin, &sfix->config); in sync_fwd_cutoff()
253 ptu_int_eq(errcode, -pte_eos); in sync_fwd_cutoff()
258 static struct ptunit_result sync_bwd_cutoff(struct sync_fixture *sfix) in sync_bwd_cutoff()
263 sfix_encode_psb(sfix->config.begin); in sync_bwd_cutoff()
264 sfix_encode_psb(sfix->config.end - ptps_psb); in sync_bwd_cutoff()
265 sfix->config.begin += 1; in sync_bwd_cutoff()
266 sfix->config.end -= 1; in sync_bwd_cutoff()
268 errcode = pt_sync_backward(&sync, sfix->config.end, &sfix->config); in sync_bwd_cutoff()
269 ptu_int_eq(errcode, -pte_eos); in sync_bwd_cutoff()