On Mon, 22 Aug 2022 14:48:30 -0700 Dave Jiang <dave.jiang@xxxxxxxxx> wrote: > Attempting to use libtraceevent to retrieve fields from events. For example here's the event I'm trying to parse: > > check-events.sh-5983 [002] ..... 261848.250238: cxl_dram_event: cxl_mem.7: Fatal time=0 id=b3cb1 > d60-069c-ab4e-b8af-4e9bfb5c9624 handle=1 related_handle=0 hdr_flags='Performance Degraded': phys_add > r=8000 volatile=FALSE desc='Threshold event' type='Invalid Address' trans_type='Internal Media Scrub > ' channel=1 rank=0 nibble_mask=0 bank_group=5 bank=2 row=0 column=1024 cor_mask=00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 valid_flags='CHANNEL|BANK > GROUP|BANK|COLUMN' > > Here's me iterating through all the fields and using tep_get_field_raw() trying to retrieve the fields. It appears that > if the field is a string type I'm not able to retrieve the field and the error written back in the seq file is > "CANT FIND FIELD". Am I doing something wrong or using the wrong API to retrieve those type of fields? > What's the format for this event? That is, what is the output of : trace-cmd list -e cxl_dram_event -F ? As what gets show in the output may not actually match the fields that are saved in the raw event. -- Steve