Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116735
b: refs/heads/master
c: a0bfb67
h: refs/heads/master
i:
  116733: d3a7f62
  116731: 986ce2b
  116727: 57a59e2
  116719: bfc0387
  116703: 508dd21
  116671: 227651a
  116607: f2c63ae
  116479: c8afee4
  116223: 1b5e16c
  115711: e281c12
  114687: b5e6a13
v: v3
  • Loading branch information
Linus Torvalds committed Oct 20, 2008
1 parent 46c756b commit 93efc13
Show file tree
Hide file tree
Showing 284 changed files with 12,171 additions and 10,265 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96499871f45b9126157b1a5c512d6e30f1635225
refs/heads/master: a0bfb673dca8a2b4324fe11e678ec6d6a9ad67e0
12 changes: 6 additions & 6 deletions trunk/CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1653,14 +1653,14 @@ S: Chapel Hill, North Carolina 27514-4818
S: USA

N: Dave Jones
E: davej@codemonkey.org.uk
E: davej@redhat.com
W: http://www.codemonkey.org.uk
D: x86 errata/setup maintenance.
D: AGPGART driver.
D: Assorted VIA x86 support.
D: 2.5 AGPGART overhaul.
D: CPUFREQ maintenance.
D: Backport/Forwardport merge monkey.
D: Various Janitor work.
S: United Kingdom
D: Fedora kernel maintainence.
D: Misc/Other.
S: 314 Littleton Rd, Westford, MA 01886, USA

N: Martin Josfsson
E: gandalf@wlug.westbo.se
Expand Down
10 changes: 6 additions & 4 deletions trunk/Documentation/markers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ Connecting a function (probe) to a marker is done by providing a probe (function
to call) for the specific marker through marker_probe_register() and can be
activated by calling marker_arm(). Marker deactivation can be done by calling
marker_disarm() as many times as marker_arm() has been called. Removing a probe
is done through marker_probe_unregister(); it will disarm the probe and make
sure there is no caller left using the probe when it returns. Probe removal is
preempt-safe because preemption is disabled around the probe call. See the
"Probe example" section below for a sample probe module.
is done through marker_probe_unregister(); it will disarm the probe.
marker_synchronize_unregister() must be called before the end of the module exit
function to make sure there is no caller left using the probe. This, and the
fact that preemption is disabled around the probe call, make sure that probe
removal and module unload are safe. See the "Probe example" section below for a
sample probe module.

The marker mechanism supports inserting multiple instances of the same marker.
Markers can be put in inline functions, inlined static functions, and
Expand Down
5 changes: 3 additions & 2 deletions trunk/Documentation/sysrq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ On all - write a character to /proc/sysrq-trigger. e.g.:

'p' - Will dump the current registers and flags to your console.

'q' - Will dump a list of all running hrtimers.
WARNING: Does not cover any other timers
'q' - Will dump per CPU lists of all armed hrtimers (but NOT regular
timer_list timers) and detailed information about all
clockevent devices.

'r' - Turns off keyboard raw mode and sets it to XLATE.

Expand Down
101 changes: 101 additions & 0 deletions trunk/Documentation/tracepoints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
Using the Linux Kernel Tracepoints

Mathieu Desnoyers


This document introduces Linux Kernel Tracepoints and their use. It provides
examples of how to insert tracepoints in the kernel and connect probe functions
to them and provides some examples of probe functions.


* Purpose of tracepoints

A tracepoint placed in code provides a hook to call a function (probe) that you
can provide at runtime. A tracepoint can be "on" (a probe is connected to it) or
"off" (no probe is attached). When a tracepoint is "off" it has no effect,
except for adding a tiny time penalty (checking a condition for a branch) and
space penalty (adding a few bytes for the function call at the end of the
instrumented function and adds a data structure in a separate section). When a
tracepoint is "on", the function you provide is called each time the tracepoint
is executed, in the execution context of the caller. When the function provided
ends its execution, it returns to the caller (continuing from the tracepoint
site).

You can put tracepoints at important locations in the code. They are
lightweight hooks that can pass an arbitrary number of parameters,
which prototypes are described in a tracepoint declaration placed in a header
file.

They can be used for tracing and performance accounting.


* Usage

Two elements are required for tracepoints :

- A tracepoint definition, placed in a header file.
- The tracepoint statement, in C code.

In order to use tracepoints, you should include linux/tracepoint.h.

In include/trace/subsys.h :

#include <linux/tracepoint.h>

DEFINE_TRACE(subsys_eventname,
TPPTOTO(int firstarg, struct task_struct *p),
TPARGS(firstarg, p));

In subsys/file.c (where the tracing statement must be added) :

#include <trace/subsys.h>

void somefct(void)
{
...
trace_subsys_eventname(arg, task);
...
}

Where :
- subsys_eventname is an identifier unique to your event
- subsys is the name of your subsystem.
- eventname is the name of the event to trace.
- TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the function
called by this tracepoint.
- TPARGS(firstarg, p) are the parameters names, same as found in the prototype.

Connecting a function (probe) to a tracepoint is done by providing a probe
(function to call) for the specific tracepoint through
register_trace_subsys_eventname(). Removing a probe is done through
unregister_trace_subsys_eventname(); it will remove the probe sure there is no
caller left using the probe when it returns. Probe removal is preempt-safe
because preemption is disabled around the probe call. See the "Probe example"
section below for a sample probe module.

The tracepoint mechanism supports inserting multiple instances of the same
tracepoint, but a single definition must be made of a given tracepoint name over
all the kernel to make sure no type conflict will occur. Name mangling of the
tracepoints is done using the prototypes to make sure typing is correct.
Verification of probe type correctness is done at the registration site by the
compiler. Tracepoints can be put in inline functions, inlined static functions,
and unrolled loops as well as regular functions.

The naming scheme "subsys_event" is suggested here as a convention intended
to limit collisions. Tracepoint names are global to the kernel: they are
considered as being the same whether they are in the core kernel image or in
modules.


* Probe / tracepoint example

See the example provided in samples/tracepoints/src

Compile them with your kernel.

Run, as root :
modprobe tracepoint-example (insmod order is not important)
modprobe tracepoint-probe-example
cat /proc/tracepoint-example (returns an expected error)
rmmod tracepoint-example tracepoint-probe-example
dmesg
5 changes: 2 additions & 3 deletions trunk/Documentation/tracers/mmiotrace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ mount -t debugfs debugfs /debug
$ echo mmiotrace > /debug/tracing/current_tracer
$ cat /debug/tracing/trace_pipe > mydump.txt &
Start X or whatever.
$ echo "X is up" > /debug/tracing/marker
$ echo "X is up" > /debug/tracing/trace_marker
$ echo none > /debug/tracing/current_tracer
Check for lost events.

Expand All @@ -59,9 +59,8 @@ The 'cat' process should stay running (sleeping) in the background.
Load the driver you want to trace and use it. Mmiotrace will only catch MMIO
accesses to areas that are ioremapped while mmiotrace is active.

[Unimplemented feature:]
During tracing you can place comments (markers) into the trace by
$ echo "X is up" > /debug/tracing/marker
$ echo "X is up" > /debug/tracing/trace_marker
This makes it easier to see which part of the (huge) trace corresponds to
which action. It is recommended to place descriptive markers about what you
do.
Expand Down
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ S: Maintained

CPU FREQUENCY DRIVERS
P: Dave Jones
M: davej@codemonkey.org.uk
M: davej@redhat.com
L: cpufreq@vger.kernel.org
W: http://www.codemonkey.org.uk/projects/cpufreq/
T: git kernel.org/pub/scm/linux/kernel/git/davej/cpufreq.git
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/alpha/kernel/sys_sable.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef struct irq_swizzle_struct

static irq_swizzle_t *sable_lynx_irq_swizzle;

static void sable_lynx_init_irq(int nr_irqs);
static void sable_lynx_init_irq(int nr_of_irqs);

#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SABLE)

Expand Down Expand Up @@ -530,11 +530,11 @@ sable_lynx_srm_device_interrupt(unsigned long vector)
}

static void __init
sable_lynx_init_irq(int nr_irqs)
sable_lynx_init_irq(int nr_of_irqs)
{
long i;

for (i = 0; i < nr_irqs; ++i) {
for (i = 0; i < nr_of_irqs; ++i) {
irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
irq_desc[i].chip = &sable_lynx_irq_type;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-ixp2000/ixdp2x00.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static struct irq_chip ixdp2x00_cpld_irq_chip = {
.unmask = ixdp2x00_irq_unmask
};

void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_irqs)
void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long *mask_reg, unsigned long nr_of_irqs)
{
unsigned int irq;

Expand All @@ -154,7 +154,7 @@ void __init ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigne

board_irq_stat = stat_reg;
board_irq_mask = mask_reg;
board_irq_count = nr_irqs;
board_irq_count = nr_of_irqs;

*board_irq_mask = 0xffffffff;

Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/arm/mach-omap2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank)

void __init omap_init_irq(void)
{
unsigned long nr_irqs = 0;
unsigned long nr_of_irqs = 0;
unsigned int nr_banks = 0;
int i;

Expand All @@ -133,14 +133,14 @@ void __init omap_init_irq(void)

omap_irq_bank_init_one(bank);

nr_irqs += bank->nr_irqs;
nr_of_irqs += bank->nr_irqs;
nr_banks++;
}

printk(KERN_INFO "Total of %ld interrupts on %d active controller%s\n",
nr_irqs, nr_banks, nr_banks > 1 ? "s" : "");
nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");

for (i = 0; i < nr_irqs; i++) {
for (i = 0; i < nr_of_irqs; i++) {
set_irq_chip(i, &omap_irq_chip);
set_irq_handler(i, handle_level_irq);
set_irq_flags(i, IRQF_VALID);
Expand Down
75 changes: 0 additions & 75 deletions trunk/arch/arm/mach-sa1100/include/mach/ide.h

This file was deleted.

8 changes: 4 additions & 4 deletions trunk/arch/avr32/mach-at32ap/extint.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static int __init eic_probe(struct platform_device *pdev)
struct eic *eic;
struct resource *regs;
unsigned int i;
unsigned int nr_irqs;
unsigned int nr_of_irqs;
unsigned int int_irq;
int ret;
u32 pattern;
Expand Down Expand Up @@ -224,15 +224,15 @@ static int __init eic_probe(struct platform_device *pdev)
eic_writel(eic, IDR, ~0UL);
eic_writel(eic, MODE, ~0UL);
pattern = eic_readl(eic, MODE);
nr_irqs = fls(pattern);
nr_of_irqs = fls(pattern);

/* Trigger on low level unless overridden by driver */
eic_writel(eic, EDGE, 0UL);
eic_writel(eic, LEVEL, 0UL);

eic->chip = &eic_chip;

for (i = 0; i < nr_irqs; i++) {
for (i = 0; i < nr_of_irqs; i++) {
set_irq_chip_and_handler(eic->first_irq + i, &eic_chip,
handle_level_irq);
set_irq_chip_data(eic->first_irq + i, eic);
Expand All @@ -256,7 +256,7 @@ static int __init eic_probe(struct platform_device *pdev)
eic->regs, int_irq);
dev_info(&pdev->dev,
"Handling %u external IRQs, starting with IRQ %u\n",
nr_irqs, eic->first_irq);
nr_of_irqs, eic->first_irq);

return 0;

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/m32r/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*/

#include <linux/module.h>
#include <linux/cpu.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/mm.h>
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/powerpc/include/asm/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
* 2 of the License, or (at your option) any later version.
*/

#ifndef __ASSEMBLY__
#include <linux/types.h>
#else
#include <asm/types.h>
#endif
#include <asm/asm-compat.h>
#include <asm/kdump.h>
#include <asm/types.h>

/*
* On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spufs/sputrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ static void __exit sputrace_exit(void)

remove_proc_entry("sputrace", NULL);
kfree(sputrace_log);
marker_synchronize_unregister();
}

module_init(sputrace_init);
Expand Down
Loading

0 comments on commit 93efc13

Please sign in to comment.