mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Russ Dill" <russ.dill@gmail.com>
To: "David Newall" <david@davidnewall.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [OT] Argument with an OS professor over profile=3
Date: Wed, 10 Oct 2007 18:50:39 -0700	[thread overview]
Message-ID: <f9d2a5e10710101850u26144173s2473f8c2dad62c3b@mail.gmail.com> (raw)
In-Reply-To: <470D7E08.10209@davidnewall.com>

On 10/10/07, David Newall <david@davidnewall.com> wrote:
> Russ Dill wrote:
> > I've been having a back and forth going for a while with my TA and OS
> > professor on the meaning of profile=3 and have been unable to convince
> > either of them. The basic question is if profile=3 is passed to kernel
> > with an 8MB text section, how big is the allocated profile buffer. His
> > answer is 1MB....
> >
> >         if (prof_shift) {
> >                 unsigned int size;
> >                 /* only text is profiled */
> >                 prof_len = (unsigned *) &_etext - (unsigned *) &_stext;
> >
> You stipulated 8MB text, but this calculates in unsigned ints, so
> prof_len = 2M.

Please have a look at my followup, I accidentally sent out code that I
had used to produce an answer as my prof thought it works. The actual
code casts to (unsigned long). Sigh, I've shot myself in the foot...

Anyway, the book (and the class covers 2.4.1) and the associated code
has since moved from init/main.c. Here's how the 2.4.1ish code looks:

http://tldp.org/HOWTO/Linux-i386-Boot-Code-HOWTO/init_main.html

      reply	other threads:[~2007-10-11  1:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  0:08 Russ Dill
2007-10-11  0:13 ` Russ Dill
2007-10-11  0:17   ` Jan Engelhardt
2007-10-11  1:36 ` David Newall
2007-10-11  1:50   ` Russ Dill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9d2a5e10710101850u26144173s2473f8c2dad62c3b@mail.gmail.com \
    --to=russ.dill@gmail.com \
    --cc=david@davidnewall.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®