Coder Social home page Coder Social logo

Comments (9)

MatiasVara avatar MatiasVara commented on June 16, 2024

We need an script that add some extra code between begin..end; statement.

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

By compiling the kernel with the "-pg", each function invokes mcount(). So it is possible to count the number of time a function is executed. It may be possible to sample the registers of each core by using the qemu monitor. For example, we could do it every 100ms and then get a graph that shows where toro elapses most of the time.

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024
while true; do
  s=`echo "info cpus" | netcat 127.0.0.1 55555 | gawk '{ match($0, /=([0-9,x,a-f]+)/, arr); if(arr[1] != "") print arr[1] }'`
  k=`addr2line -s -f -e StaticWebServer $s`
  echo $k
  # sleep 0.1
done

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

I better way is to use the QMP to get:

  • $EIP register
  • $EBP+8
    Then you can get the current function and the parent's function.
    Add this to qemu-args:
    -qmp unix:./qmp-sock,server,nowait

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

https://matplotlib.org/gallery/pie_and_polar_charts/pie_features.html#sphx-glr-gallery-pie-and-polar-charts-pie-features-py

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

./qmp --path=./qmp-sock human-monitor-command --command-line="info registers"

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

This tool may be developed in a different repo since it is not limited to toro.

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

The tools is developed in https://github.com/torokernel/qprofiler

from torokernel.

MatiasVara avatar MatiasVara commented on June 16, 2024

By adding -pg, the compilation fails but the mcount() is added. It would be possible to compile the kernel manually linking it.

from torokernel.

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.