Re: /dev/kmem

From: Russell King (rmk@arm.linux.org.uk)
Date: Sat May 06 2000 - 07:09:59 EDT

  • Next message: Keith Owens: "Re: /dev/kmem"

    George Anzinger writes:
    > I am more interested in making kernel symbols and their values available
    > to programs. For example I currently need the value of
    > "delay_at_last_interrupt" a wonderful value that the time.c keeps.
    >
    > I assume that I can clip code from ksymoops to fetch the symbol address
    > and hopefully its value. Since this thing changes each 10ms I need to
    > get it in a hurry.

    Presumably you'd parse the System.map file once, and then reference internal
    data structures in your program to obtain the address? The kernel does not
    change that often on a machine while your program is running (hopefully it
    never does ;)), so you're looking at a one-time parse. Once that is done,
    you can then happily read any value from any address in kernel space that
    you desire, as rapidly as lseek() and read() allows you to.

    If you're talking about a program that the user invokes, then you don't
    have 10ms accuracy on the user pressing the return key, so what does an
    initial 50ms of parse time matter?

    I hope I haven't missed any of you previous points - I've not been following
    the thread closely.
       _____
      |_____| ------------------------------------------------- ---+---+-
      | | Russell King rmk@arm.linux.org.uk --- ---
      | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
      | +-+-+ --- -+-
      / | THE developer of ARM Linux |+| /|\
     / | | | --- |
        +-+-+ ------------------------------------------------- /\\\ |

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat May 06 2000 - 07:14:36 EDT