@@ -4326,7 +4326,6 @@ int perf_session__read_header(struct perf_session *session)
4326
4326
int perf_event__process_feature (struct perf_session * session ,
4327
4327
union perf_event * event )
4328
4328
{
4329
- const struct perf_tool * tool = session -> tool ;
4330
4329
struct feat_fd ff = { .fd = 0 };
4331
4330
struct perf_record_header_feature * fe = (struct perf_record_header_feature * )event ;
4332
4331
int type = fe -> header .type ;
@@ -4342,28 +4341,23 @@ int perf_event__process_feature(struct perf_session *session,
4342
4341
return -1 ;
4343
4342
}
4344
4343
4345
- if (!feat_ops [feat ].process )
4346
- return 0 ;
4347
-
4348
4344
ff .buf = (void * )fe -> data ;
4349
4345
ff .size = event -> header .size - sizeof (* fe );
4350
4346
ff .ph = & session -> header ;
4351
4347
4352
- if (feat_ops [feat ].process (& ff , NULL )) {
4348
+ if (feat_ops [feat ].process && feat_ops [ feat ]. process (& ff , NULL )) {
4353
4349
ret = -1 ;
4354
4350
goto out ;
4355
4351
}
4356
4352
4357
- if (!feat_ops [feat ].print || !tool -> show_feat_hdr )
4358
- goto out ;
4359
-
4360
- if (!feat_ops [feat ].full_only ||
4361
- tool -> show_feat_hdr >= SHOW_FEAT_HEADER_FULL_INFO ) {
4362
- feat_ops [feat ].print (& ff , stdout );
4363
- } else {
4364
- fprintf (stdout , "# %s info available, use -I to display\n" ,
4365
- feat_ops [feat ].name );
4353
+ if (dump_trace ) {
4354
+ printf (", " );
4355
+ if (feat_ops [feat ].print )
4356
+ feat_ops [feat ].print (& ff , stdout );
4357
+ else
4358
+ printf ("# %s" , feat_ops [feat ].name );
4366
4359
}
4360
+
4367
4361
out :
4368
4362
free_event_desc (ff .events );
4369
4363
return ret ;
0 commit comments