Coder Social home page Coder Social logo

Comments (2)

Neo-Outis avatar Neo-Outis commented on July 21, 2024 1

Hi ,

Thanks for your explanation !
I will conduct experiments on it.

regards
Neo

from sgx-step.

jovanbulck avatar jovanbulck commented on July 21, 2024

Hi Neo,

Glad to hear you are using SGX-Step and find it helpful! :-)

And I'm very curious about why we have to redirect our output to an extra file ?

When printing to a file, the code in between two interrupts is more minimal as only the file needs to be updated (which most likely can all proceed in memory and doesn't even need to involve disk I/O). On the contrary, when writing terminal output to the screen, the kernel will have to execute more code for I/O operations etc. Hence, my hypothesis is that in the first case, where less code is executed, the caches etc remain warm, which makes the interrupt return path ERESUME more predictable and hence the single-stepping interval timer will fire more accurately.

I remember this was mostly important for me in early SGX-Step versions, but since I have also seen reliable single-stepping with direct terminal I/O. Also, there might be a difference depending on whether you execute the code locally on your system (ie directly update the screen) or remotely (ie send terminal output via SSH). I never really bothered to look deeper into this, but I expect that some more explicit experimentation would be able to more accurately benchmark the impact on single-stepping.

BTW, I remembered that you mentioned this phenomenon somewhere, but now I can't find it. If you still remember where you mentioned it, it will be very helpful.

I mentioned it once in the bench code when initially developing the framework. This code is still from the original 1.0 release and I hope to find some time soon to refactor and integrate this all a bit cleaner and more consistent.

https://github.com/jovanbulck/sgx-step/blob/master/app/bench/main.c#L143

from sgx-step.

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.