Git Product home page Git Product logo

Comments (10)

bebbo avatar bebbo commented on August 28, 2024

I get

index % time    self  children    called     name
                0.00    0.00       1/1           main [52]
[1]      0.0    0.00    0.00       1         fct_1 [1]
                0.00    0.00       1/1           fct_2 [2]                                                                                                                                   ```

from amiga-gcc.

githubaf avatar githubaf commented on August 28, 2024

I see. So it might be a problem of gprof2dot visualizer? I just asked there.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

any news here?

from amiga-gcc.

githubaf avatar githubaf commented on August 28, 2024

I opened an issue here:
jrfonseca/gprof2dot#55

No comments do far.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

please retest

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

you might retest this due to the recent changes, no?

from amiga-gcc.

githubaf avatar githubaf commented on August 28, 2024

We just got a reply from jrfonseca/gprof2dot#55

There are 2 problems here:

gprof couldn't figure out who called strlen. Perhaps because libc had no debug information, or due to some limitation with m68k architecture (e.g., no stack frame pointer by default)?

gprof lists main as a caller (ie, an edge on the call graph), but didn't create a node for it in the report. No idea why. I never seen this with x86. Perhaps gprof's -c/--static-call-graph help.

Both issues are in gcc/gprof domain, not the gprof2dot tool. The missing main issue is minor IMO. But the strlen is a showstopper -- if time spent in libc functions is not accurately billed to the callers, then the whole graph will end up biased and useless.

I hope this helps.

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

then you need libs compiled with -pg.
not a real issue.

from amiga-gcc.

githubaf avatar githubaf commented on August 28, 2024

I don't understand why main gets lost when compiling with any optimization level, but yes, it seems compiling libnix with -pg seems to help. So we can close this issue.

Would it make sense to compile the libs (libnix) additionally with -pg during toolchain-installation and use this -pg-compiled version automatically when compiling an executable with -pg?

(I currently build two versions (-g and -pg) of libnix into different directories and have a symbolic link "libnix" pointing to of these two directories)

from amiga-gcc.

bebbo avatar bebbo commented on August 28, 2024

IMHO it's easier to use two independent toolchains in different prefixes.

  • with pg
  • without pg

that way you have it handy for all variants (baserel, 020, math, etc.p.p.) , just use the prefix you want.

from amiga-gcc.

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.