@@ -50,8 +50,6 @@ struct cs_etm_auxtrace {
50
50
u8 timeless_decoding ;
51
51
u8 snapshot_mode ;
52
52
u8 data_queued ;
53
- u8 sample_branches ;
54
- u8 sample_instructions ;
55
53
56
54
int num_cpu ;
57
55
u64 latest_kernel_timestamp ;
@@ -410,8 +408,8 @@ static void cs_etm__packet_swap(struct cs_etm_auxtrace *etm,
410
408
{
411
409
struct cs_etm_packet * tmp ;
412
410
413
- if (etm -> sample_branches || etm -> synth_opts .last_branch ||
414
- etm -> sample_instructions ) {
411
+ if (etm -> synth_opts . branches || etm -> synth_opts .last_branch ||
412
+ etm -> synth_opts . instructions ) {
415
413
/*
416
414
* Swap PACKET with PREV_PACKET: PACKET becomes PREV_PACKET for
417
415
* the next incoming packet.
@@ -1365,7 +1363,6 @@ static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
1365
1363
err = cs_etm__synth_event (session , & attr , id );
1366
1364
if (err )
1367
1365
return err ;
1368
- etm -> sample_branches = true;
1369
1366
etm -> branches_sample_type = attr .sample_type ;
1370
1367
etm -> branches_id = id ;
1371
1368
id += 1 ;
@@ -1389,7 +1386,6 @@ static int cs_etm__synth_events(struct cs_etm_auxtrace *etm,
1389
1386
err = cs_etm__synth_event (session , & attr , id );
1390
1387
if (err )
1391
1388
return err ;
1392
- etm -> sample_instructions = true;
1393
1389
etm -> instructions_sample_type = attr .sample_type ;
1394
1390
etm -> instructions_id = id ;
1395
1391
id += 1 ;
@@ -1420,7 +1416,7 @@ static int cs_etm__sample(struct cs_etm_queue *etmq,
1420
1416
tidq -> prev_packet -> last_instr_taken_branch )
1421
1417
cs_etm__update_last_branch_rb (etmq , tidq );
1422
1418
1423
- if (etm -> sample_instructions &&
1419
+ if (etm -> synth_opts . instructions &&
1424
1420
tidq -> period_instructions >= etm -> instructions_sample_period ) {
1425
1421
/*
1426
1422
* Emit instruction sample periodically
@@ -1503,7 +1499,7 @@ static int cs_etm__sample(struct cs_etm_queue *etmq,
1503
1499
}
1504
1500
}
1505
1501
1506
- if (etm -> sample_branches ) {
1502
+ if (etm -> synth_opts . branches ) {
1507
1503
bool generate_sample = false;
1508
1504
1509
1505
/* Generate sample for tracing on packet */
@@ -1582,7 +1578,7 @@ static int cs_etm__flush(struct cs_etm_queue *etmq,
1582
1578
1583
1579
}
1584
1580
1585
- if (etm -> sample_branches &&
1581
+ if (etm -> synth_opts . branches &&
1586
1582
tidq -> prev_packet -> sample_type == CS_ETM_RANGE ) {
1587
1583
err = cs_etm__synth_branch_sample (etmq , tidq );
1588
1584
if (err )
0 commit comments