Closed winterddd closed 1 year ago
The OCSD_GEN_TRC_ELEM_NACC is a result of the perf program not supplying the instruction code memory image for those addresses. The packet contains the first address of the memory block the decoder was attempting to read.
The basics of ETM trace are such that only significant waypoints are actually traced - branches, returns etc, and of these only those that an address cannot be calculated from the executed instruction code are supplied with an address value in the trace data. The decoder then walks the memory image to reconstruct the execution of the program, associating trace elements with addresses and instructions in the code.
This means it is impossible to decode trace without the relevant memory images and thus you are seeing the errors.
Hi I use OpenCSD with perf to trace the Java program. I want to know the branch address and target address in the Java thread even if I can not get the symbol corresponding to these addresses, I find that the perf cs_etm session only decodes the address that can be accessed in the mapped memory of shared library. I read the source code and found the root cause in OpenCSD, these address belongs to packets which are defined as OCSD_GEN_TRC_ELEM_ADDR_NACC. Can OpenCSD still decode when OCSD_GEN_TRC_ELEM_ADDR_NACC occurred, and return the element that includes OCSD_GEN_TRC_ELEM_ADDR_NACC packet with unaccessed address to the application? This will be very useful for Java programs.