OpenBSD Journal

PCC debug and speed improvements

Contributed by ray on from the harder-better-faster-stronger-debuggier dept.

Anders Magnusson (ragge@) has recently committed some improvements to pcc and wrote to the pcc-list,

I have just fixed the stabs code so that debug code can be generated even if some of the optimizing flags are turned on. To state the obvious, variable information might be broken or nonexistent if any optimization is used, but at least it helps with running a debugger on optimized code.

Parts of this will be made prettier in the future, but at least it works for now.

-- Ragge


(Hm, maybe I should have a changelog, or blog, or something to write all updates in?)

I have also removed some sanity check code in the register allocator for a new code path, it has been there for some years and never failed, and also increased a hash table. This made the register allocator take about 5% (!) of the time it used to.

Timing shows that the actual C compiler in average takes less than 100 milliseconds compiling a source file in the base system when optimizing is turned on. This is on a 733MHz P4. I think it's quite impressing :-)

Note that cpp is significantly slower, this will be addressed in the future.

-- Ragge

Thanks Ragge for all the hard work! Note that these improvements have not yet been imported into OpenBSD, so you'll have to go to the pcc site to test this out.

(Comments are closed)


Comments
  1. By Brynet (Brynet) on

    And don't forget to donate! :-)

    http://www.bsdfund.org/projects/pcc/

  2. By Anonymous Coward (67.69.227.99) on

    If I understand this correctly, the PCC people are working actively on PCC as well as the OpenBSD crew and even NetBSD? If NetBSD is too, are those changes being exchanged (and vice versa too) to each OS and to/from PCC as well?

    Just curious to know...

    Regards,

    Comments
    1. By Anonymous Coward (66.134.162.202) on

      > If I understand this correctly, the PCC people are working actively on PCC as well as the OpenBSD crew and even NetBSD? If NetBSD is too, are those changes being exchanged (and vice versa too) to each OS and to/from PCC as well?
      >
      > Just curious to know...
      >
      > Regards,

      Well yes. PCC has it's own CVS repository where development happens.
      Every once in a while OpenBSD, NetBSD, and others merge the changes
      back into their own CVS repositories.. just like other software.

    2. By Anonymous Coward (2a01:198:25d:0:250:baff:fe82:b6b4) on

      > and even NetBSD?

      Better: and even MirBSD ;-) But we haven't imported it
      into base yet, we are sticking with a port, a patches/
      directory and sending diffs to people or mailing lists
      for now.

      Comments
      1. By Anonymous Coward (212.20.215.132) on

        > > and even NetBSD?
        >
        > Better: and even MirBSD ;-)

        This is going to sound like flame bait, and it probably is, but since you mentioned MirBSD my curiosity led me to their web site which explains that it's a fork of OpenBSD and

        "The most important differences to OpenBSD are:
        * wtf, a database of acronyms
        * Uses "MirBSD" as its uname"

        Are you shitting me? wtf and uname are among the most important differences? I don't even want to know what the less important differences are. If this is supposed to be a joke, then it's not funny. If it's supposed to be serious, well good luck with that.

        Comments
        1. By Frank DENIS (91.121.184.59) on http://00f.net

          Well, if you had spent a few more seconds on the website, you'd have noticed that Thorsten has made a lot of changes, and he also has rewritten/improved many tools.

          MirBSD is not a really significant fork, as DragonflyBSD is to FreeBSD. MirBSD has a tiny users base. MirBSD is mostly made by one person, just for fun. It never was designed to compete with OpenBSD, nor to be a joke. Thorsten customizes OpenBSD according to his needs, and he makes the source code available. That's all about it. Stupid, ridiculous, waste of time... yes, let's say them all in order to feed trolls. Done. Now, let Thosten spend his spare time on what he wants to.

          Comments
          1. By tedu (udet) on

            > Well, if you had spent a few more seconds on the website, you'd have noticed that Thorsten has made a lot of changes, and he also has rewritten/improved many tools.
            >
            > MirBSD is not a really significant fork, as DragonflyBSD is to FreeBSD. MirBSD has a tiny users base. MirBSD is mostly made by one person, just for fun. It never was designed to compete with OpenBSD, nor to be a joke. Thorsten customizes OpenBSD according to his needs, and he makes the source code available. That's all about it.

            You forgot the part about keeping all us undeadly readers up to date on these changes.

          2. By Anonymous Coward (2a01:198:25d:0:250:baff:fe82:b6b4) on

            > MirBSD is not a really significant fork, as DragonflyBSD is to
            > FreeBSD.

            Right, it's more significant. DragonFly is just a different kernel
            with ancient FreeBSD 4 userland.

            > MirBSD is mostly made by one person

            Similarily wrong. There are more developers and much more users.

            Comments
            1. By Miod Vallat (miod) on

              > Right, it's more significant. DragonFly is just a different kernel
              > with ancient FreeBSD 4 userland.

              You really ought to give a look at DragonFlyBSD, instead of spreading false statements.

      2. By Gordon Willem Klok (96.52.229.126) gwk@gwk.ca on Gordon Willem Klok

        > > and even NetBSD?
        >
        > Better: and even MirBSD ;-) But we haven't imported it
        > into base yet, we are sticking with a port, a patches/
        > directory and sending diffs to people or mailing lists
        > for now.

        Who is we ? did MirBSD finally get a user other than TG ?

  3. By Venture37 (venture37) venture37<A>hotmail.com on www.geeklan.co.uk

    Dont you mean 733Mhz P3?!

    Comments
    1. By Brynet (Brynet) on

      > Dont you mean 733Mhz P3?!

      $ sysctl hw.{model,setperf,cpuspeed}
      hw.model=Intel(R) Pentium(R) 4 CPU 1.70GHz ("GenuineIntel" 686-class)
      hw.setperf=45
      hw.cpuspeed=847
      $

      Let's just assume he can get around 733Mhz on his P4, don't insult the man.

    2. By ragge (ragge) on

      > Dont you mean 733Mhz P3?!

      Yes, of course :-/ Mental slipout, I'm better in VAX CPUs.

  4. By Anonymous Coward (194.78.205.247) on

    Maybe you should indeed have a changelog or blog for this stuff, we're all rather curious to see how it's going and such!

    Comments
    1. By Anonymous Coward (212.20.215.132) on

      > Maybe you should indeed have a changelog or blog for this stuff,
      > we're all rather curious to see how it's going and such!

      The pcc-commit-list will keep you informed. I say let the developers work on writing good code. If someone wants an update on progress, then write one based on the commit logs and discussions and post it here for others to read ;-)

  5. By Anonymous Bullard (80.37.248.67) on

    I made a humble donation through Paypal but the receipt just displays Linux/BSD foundation. How do I know that my donation reached pcc and not GNOME or something like that?

    Comments
    1. By Anonymous Coward (85.19.213.88) on

      > I made a humble donation through Paypal but the receipt just displays
      > Linux/BSD foundation. How do I know that my donation reached pcc and
      > not GNOME or something like that?

      I got an email from donations@bsdfund.org with the subject "pcc Donation Acknowledgment" thanking me for my donation to BSD Fund's pcc Fund, and the transaction was charged from "GOOGLE *BSD FUND" (I used Google Checkout). I assume it goes to the intended recipient.

      Comments
      1. By Anonymous Bullard (80.37.248.67) on

        Sorry for that, I looked better and it was there, at least in the confirmation email. I was afraid that the donation details had been lost when logging in and out but it seems they didn't.

    2. By Michael Dexter (87.246.136.51) on bsdfund.org

      > I made a humble donation through Paypal but the receipt just displays Linux/BSD foundation. How do I know that my donation reached pcc and not GNOME or something like that?

      "Linux Fund / BSD Fund" is correct as that is a joint account. The money will go to the right place. What matters is the item specified in the donation. bsdfund@gmail.com is the correct Google Checkout account and they are not charging *any* fees until January.

      Most thank you letters are out and I hope to have a donors page up soon.

      Thank you everyone who has donated!


      Michael

      BSD Fund

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]