public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net,
	kiran@in.ibm.com
Subject: Re: [RFC] [PATCH] Scalable Statistics Counters
Date: 05 Dec 2001 15:03:12 +0100	[thread overview]
Message-ID: <p73ofld9333.fsf@amdsim2.suse.de> (raw)
In-Reply-To: <20011205163153.E16315@in.ibm.com.suse.lists.linux.kernel> <Pine.LNX.4.33L.0112051109340.4079-100000@imladris.surriel.com.suse.lists.linux.kernel>
In-Reply-To: Rik van Riel's message of "5 Dec 2001 14:22:44 +0100"

Rik van Riel <riel@conectiva.com.br> writes:
> 
> (it'd be so cool if we could just start using a statistic variable
> through some macro and it'd be automatically declared and visible
> in /proc ;))

It is rather easy using ELF segments. You just do macros that put the
names and a pointer to the variable and the type into an ELF segment
starting with a known symbol. Then at kernel/module init you walk this
segment and do the necessary registration. 

[has also been done for sysctls]

Disadvantage is that one needs to change modutils for it to make it also

Also it needs new binutils; old binutils tend to mislink code with
the many inter section relocations generated by this technique.

-Andi (who would also like such an easy statistics interface) 

       reply	other threads:[~2001-12-05 14:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20011205163153.E16315@in.ibm.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.33L.0112051109340.4079-100000@imladris.surriel.com.suse.lists.linux.kernel>
2001-12-05 14:03   ` Andi Kleen [this message]
2001-12-06 12:33 [Lse-tech] [RFC] [PATCH] Scalable Statistics Counters Ravikiran G Thirumalai
2001-12-06 12:59 ` Keith Owens
  -- strict thread matches above, loose matches on Subject: below --
2001-12-05 11:01 Ravikiran G Thirumalai
2001-12-05 13:13 ` Rik van Riel
2001-12-05 15:39   ` Dipankar Sarma
2001-12-05 20:08   ` Andrew Morton
2001-12-06  3:18     ` Rusty Russell
2001-12-07 12:52       ` Dipankar Sarma
2001-12-08  7:38         ` Rusty Russell

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=p73ofld9333.fsf@amdsim2.suse.de \
    --to=ak@suse.de \
    --cc=kiran@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=riel@conectiva.com.br \
    /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