lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 25 Mar 2007 12:23:51 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Wink Saville <wink@...ille.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Documention for trace records (trec).

On Sat, 24 Mar 2007 16:51:37 -0700 Wink Saville wrote:

> Trec is a light weight tracing mechanism that places
> trace information into a buffer. The contents of the
> buffer is dumped when errors occurs or when enabled
> via SYSRQ commands.
> 
> Signed-off-by: Wink Saville <wink@...ille.com>
> ---
>  Documentation/trec.txt |   87 ++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 87 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/trec.txt
> 
> diff --git a/Documentation/trec.txt b/Documentation/trec.txt
> new file mode 100644
> index 0000000..2275edd
> --- /dev/null
> +++ b/Documentation/trec.txt
> @@ -0,0 +1,87 @@
> +Title	: Trace Records
> +Authors	: Wink Saville <wink@...ille.com>
> +
> +CONTENTS
> +
> +1. Concepts
> +2. Architectures Supported
> +3. Configuring
> +4. API Reference
> +5. Overhead
> +6. TODO
> +
> +
> +1. Concepts
> +
> +Trace records are a light weight tracing technique that time stamps

                       lightweight                 ...     timestamps

> +small amounts of information and stores them in a buffer. TREC's are
> +light enough that they may be sprinkled most anywhere in the kernel
> +and have very little performance impact.
> +
> +For instance they can be placed in the scheduler and ISR's to watch
> +the interaction between ISR's and the scheduler. They can be placed
> +in memory handling routines to determine how and when memory is
> +allocated and freed.
> +
> +In the current default configuration the trec's are dumped by calling
> +trec_print_snapshot when die() or panic() are called as well as when

                                             is

> +the kernel itself page faults in do_page_fault.
> +
> +If CONFIG_MAGIC_SYSRQ is the 'y' command will execute trec_snapshot
                           ^
                           enabled,

> +and the 'z' command will print the current snapshot.
> +
> +A general macro TREC allows trec_write to be invoked as a macro and
> +TRECC allows it to be invoked conditionally. See include/linux/trec.h
> +for the current set of macros.
> +
> +2. Architectures Supported
> +
> +Should support all architectures has been tested only on:
                                   ^
                                   ;
> +
> +- X86_64
> +
> +
> +3. Configuring
> +
> +Since trec's are implemented as a device driver they are configured
> +by enabling support in the "Device Drivers" section of as they could
                                                         ^
                                                         ??

> +be used early being a module is not supported.
> +
> +
> +4. API Reference
> +
> +Trec supports the following API:
> +
> +void trec_init(void):
> +
> +  Initialize the module, this may be called before the driver is loaded
                          ^
                          ; (or maybe :)

> +  if it is desired to use trec's early.
> +
> +void trec_write(unsigned long pc, int pid, unsigned long v1, unsigned long v2);
> +
> +  This is the routine used to write into the buffer. pc is the program counter

end above line with ,

> +  pid is the process id and v1 and v2 are two parameters.
> +
> +void trec_snapshot(void);
> +
> +  Calling this function takes a snapshot of the current trec buffer so that it
> +  will not be modified. This is called prior to printing the snapshot via
> +  trec_print_snapshot.
> +
> +void trec_print_snapshot(void);
> +
> +  Print the snapshot.
> +
> +5. Overhead
> +
> +Measured on a 2.4GHZ Core 2 Duo the readings between two TREC's is
> +270 tics of the rdtsc or about 0.1us. No attempt has been made to
> +optimize and less information can be collected if the overhead
> +is still to high.

            too

> +
> +
> +6. TODO
> +
> +a. Add code to dump trec to user space
> +b. Enhance to allow runtime registration and runtime enable disable.
> +


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ