Coder Social home page Coder Social logo

Comments (7)

markus-metzger avatar markus-metzger commented on June 11, 2024

You need to synchronize on a PSB packet. Looks like you'd want pt_<lyr>_sync_backward(). You can use that repeatedly to decode PSB segments from back to front. You'd need to detect when you cross to a PSB segment you already decoded or split the trace to avoid that. You should get status update events when decoding a new PSB+.

from libipt.

loizos01 avatar loizos01 commented on June 11, 2024

Thank you, I will try that on Monday and close this. Enjoy your weekend!

from libipt.

loizos01 avatar loizos01 commented on June 11, 2024

Hi,

After the first pt_<lyr>_sync_backward() call , the following calls return pte_eos error. Events drain without error.

Offset: 0000000000000034 pte_eos
Error: synchronising decoder1
Offset: fffffffffffffffe pte_eos
Error: synchronising decoder1
Offset: fffffffffffffffe pte_eos
Error: synchronising decoder1

from libipt.

markus-metzger avatar markus-metzger commented on June 11, 2024

pte_eos means that you reached the beginning of the trace buffer. How many PSB packets are there in the trace?

from libipt.

loizos01 avatar loizos01 commented on June 11, 2024

There is only one PSB packet, for some reason I thought each PSB packet corresponded to an executed instruction and by calling pt_<lyr>_sync_backward() would sync onto the next instruction in a backwards direction. What I am trying to optimize is, for instance, now, I sync into the decoder from the beginning and using pt_insn_next I decode the trace successfully until the end. But, I am only interested in the last lets say, 100 executed instructions(out of 20k).

from libipt.

markus-metzger avatar markus-metzger commented on June 11, 2024

The trace cannot be decoded backwards. You may configure PSB to be as frequent as possible to reduce the amount of trace that needs to be decoded. You may also consider using the block decoder, which is typically faster, but requires decoding the instructions in a block separately.

from libipt.

loizos01 avatar loizos01 commented on June 11, 2024

Alright, thank you

from libipt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.