16 May, 2009

1 commit


29 Apr, 2009

1 commit

  • The pages allocated for the splice binary buffer did not initialize
    the ref count correctly. This caused pages not to be freed and causes
    a drastic memory leak.

    Thanks to logdev I was able to trace the tracer to find where the leak
    was.

    [ Impact: stop memory leak when using splice ]

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

14 Apr, 2009

2 commits

  • Before patch:

    # tracer: branch
    #
    # TASK-PID CPU# TIMESTAMP FUNCTION
    # | | | | |
    -2981 [000] 24008.872738: [ ok ] trace_irq_handler_exit:irq_event_types.h:41
    -2981 [000] 24008.872742: [ ok ] note_interrupt:spurious.c:229
    ...

    After patch:

    # tracer: branch
    #
    # TASK-PID CPU# TIMESTAMP CORRECT FUNC:FILE:LINE
    # | | | | | |
    -2985 [000] 26329.142970: [ ok ] slab_free:slub.c:1776
    -2985 [000] 26329.142972: [ ok ] trace_kmem_cache_free:kmem_event_types.h:191
    ...

    Signed-off-by: Zhao Lei
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Before patch:
    # tracer: power
    #
    # TASK-PID CPU# TIMESTAMP FUNCTION
    # | | | | |
    [ 676.875865889] CSTATE: Going to C1 on cpu 0 for 0.005911463
    [ 676.882938805] CSTATE: Going to C1 on cpu 0 for 0.104796532
    ...

    After patch:
    # tracer: power
    #
    # TIMESTAMP STATE EVENT
    # | | |
    [ 676.875865889] CSTATE: Going to C1 on cpu 0 for 0.005911463
    [ 676.882938805] CSTATE: Going to C1 on cpu 0 for 0.104796532
    ...

    v2: Use seq_puts instead of seq_printf

    Signed-off-by: Zhao Lei
    Cc: Arjan van de Ven
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhaolei
     

12 Apr, 2009

4 commits

  • - propagate return value of filter_add_pred() to the user

    - return -ENOSPC but not -ENOMEM or -EINVAL when the filter array
    is full

    Signed-off-by: Li Zefan
    Acked-by: Tom Zanussi
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Before patch:

    # echo 'parent_pid == 0x10' > events/sched/sched_process_fork/filter
    # cat sched/sched_process_fork/filter
    parent_pid == 0

    After patch:

    # cat sched/sched_process_fork/filter
    parent_pid == 16

    Also check the input more strictly.

    Signed-off-by: Li Zefan
    Acked-by: Tom Zanussi
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Try this, and you'll see NULL pointer dereference bug:

    # echo -n 'parent_comm ==' > sched/sched_process_fork/filter

    Because we passed NULL ptr to simple_strtoull().

    Signed-off-by: Li Zefan
    Acked-by: Tom Zanussi
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Make sure messages from user space are NIL-terminated strings,
    otherwise we could dump random memory while reading filter file.

    Try this:
    # echo 'parent_comm ==' > events/sched/sched_process_fork/filter
    # cat events/sched/sched_process_fork/filter
    parent_comm == �

    Signed-off-by: Li Zefan
    Acked-by: Tom Zanussi
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     

10 Apr, 2009

6 commits

  • print fmt: "irq=%d return=%s", __entry->irq, __entry->ret ? \"handled\" : \"unhandled\"

    "__entry" should be convert to "REC" by __stringify() macro.

    Signed-off-by: Zhao Lei
    Acked-by: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • When moving documents to Documentation/trace/, I forgot to
    grep Kconfig to find out those references.

    Signed-off-by: Li Zefan
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Pekka Enberg
    Cc: Pekka Paalanen
    Cc: eduard.munteanu@linux360.ro
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • I got these from strace:

    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 12288
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 16384
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192
    splice(0x3, 0, 0x5, 0, 0x1000, 0x1) = 8192

    I wanted to splice_read 4096 bytes, but it returns 8192 or larger.

    It is because the return value of tracing_buffers_splice_read()
    does not include "zero out any left over data" bytes.

    But tracing_buffers_read() includes these bytes, we make them
    consistent.

    Signed-off-by: Lai Jiangshan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Impact: Cleanup

    These two lines:

    if (unlikely(*ppos))
    return -ESPIPE;

    in tracing_buffers_splice_read() are not needed, VFS layer
    has disabled seek(2).

    We remove these two lines, and then we can update file->f_pos.

    And tracing_buffers_read() updates file->f_pos, this fix
    make tracing_buffers_splice_read() updates file->f_pos too.

    Signed-off-by: Lai Jiangshan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Impact: Cleanup

    Sometimes, we open trace_pipe_raw, but we don't read(2) it,
    we just splice(2) it, thus, the page is not used.

    Signed-off-by: Lai Jiangshan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Impact: disable pread()

    We set tracing_buffers_fops.llseek to no_llseek,
    but we can still perform pread() to read this file.

    That is not expected.

    This fix uses nonseekable_open() to disable it.

    tracing_buffers_fops.llseek is still set to no_llseek,
    it mark this file is a "non-seekable device" and is used by
    sys_splice(). See also do_splice() or manual of splice(2):

    ERRORS
    EINVAL Target file system doesn't support splicing;
    neither of the descriptors refers to a pipe;
    or offset given for non-seekable device.

    Signed-off-by: Lai Jiangshan
    Cc: Frederic Weisbecker
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     

09 Apr, 2009

2 commits

  • Impact: fix kfree crash with non-standard act_mask string

    If passing a string with leading white spaces to strstrip(),
    the returned ptr != the original ptr.

    This bug was introduced by me.

    Signed-off-by: Li Zefan
    Cc: Jens Axboe
    Cc: Arnaldo Carvalho de Melo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Impact: fix build warnings and possibe compat misbehavior on IA64

    Building a kernel on ia64 might trigger these ugly build warnings:

    CC arch/ia64/ia32/sys_ia32.o
    In file included from arch/ia64/ia32/sys_ia32.c:55:
    arch/ia64/ia32/ia32priv.h:290:1: warning: "elf_check_arch" redefined
    In file included from include/linux/elf.h:7,
    from include/linux/module.h:14,
    from include/linux/ftrace.h:8,
    from include/linux/syscalls.h:68,
    from arch/ia64/ia32/sys_ia32.c:18:
    arch/ia64/include/asm/elf.h:19:1: warning: this is the location of the previous definition
    [...]

    sys_ia32.c includes linux/syscalls.h which in turn includes linux/ftrace.h
    to import the syscalls tracing prototypes.

    But including ftrace.h can pull too much things for a low level file,
    especially on ia64 where the ia32 private headers conflict with higher
    level headers.

    Now we isolate the syscall tracing headers in their own lightweight file.

    Reported-by: Tony Luck
    Tested-by: Tony Luck
    Signed-off-by: Frederic Weisbecker
    Acked-by: Tony Luck
    Signed-off-by: Steven Rostedt
    Cc: Peter Zijlstra
    Cc: Jason Baron
    Cc: "Frank Ch. Eigler"
    Cc: Mathieu Desnoyers
    Cc: KOSAKI Motohiro
    Cc: Lai Jiangshan
    Cc: Jiaying Zhang
    Cc: Michael Rubin
    Cc: Martin Bligh
    Cc: Michael Davidson
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     

08 Apr, 2009

1 commit

  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y
    branch tracer: Fix for enabling branch profiling makes sparse unusable
    ftrace: Correct a text align for event format output
    Update /debug/tracing/README
    tracing/ftrace: alloc the started cpumask for the trace file
    tracing, x86: remove duplicated #include
    ftrace: Add check of sched_stopped for probe_sched_wakeup
    function-graph: add proper initialization for init task
    tracing/ftrace: fix missing include string.h
    tracing: fix incorrect return type of ns2usecs()
    tracing: remove CALLER_ADDR2 from wakeup tracer
    blktrace: fix pdu_len when tracing packet command requests
    blktrace: small cleanup in blk_msg_write()
    blktrace: NUL-terminate user space messages
    tracing: move scripts/trace/power.pl to scripts/tracing/power.pl

    Linus Torvalds
     

07 Apr, 2009

9 commits

  • If we cat debugfs/tracing/events/ftrace/bprint/format, we'll see:
    name: bprint
    ID: 6
    format:
    field:unsigned char common_type; offset:0; size:1;
    field:unsigned char common_flags; offset:1; size:1;
    field:unsigned char common_preempt_count; offset:2; size:1;
    field:int common_pid; offset:4; size:4;
    field:int common_tgid; offset:8; size:4;

    field:unsigned long ip; offset:12; size:4;
    field:char * fmt; offset:16; size:4;
    field: char buf; offset:20; size:0;

    print fmt: "%08lx (%d) fmt:%p %s"

    There is an inconsistent blank before char buf.

    Signed-off-by: Zhao Lei
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Some of the tracers have been renamed, which was not updated in the in-kernel
    run-time README file. Update it.

    Signed-off-by: Nikanth Karthikesan
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Nikanth Karthikesan
     
  • Impact: fix a crash while cat trace file

    Currently we are using a cpumask to remind each cpu where a
    trace occured. It lets us notice the user that a cpu just had
    its first trace.

    But on latest -tip we have the following crash once we cat the trace
    file:

    IP: [] print_trace_fmt+0x45/0xe7
    *pde = 00000000
    Oops: 0000 [#1] PREEMPT SMP
    last sysfs file: /sys/class/net/eth0/carrier
    Pid: 3897, comm: cat Not tainted (2.6.29-tip-02825-g0f22972-dirty #81)
    EIP: 0060:[] EFLAGS: 00010297 CPU: 0
    EIP is at print_trace_fmt+0x45/0xe7
    EAX: 00000000 EBX: 00000000 ECX: c12d9e98 EDX: ccdb7010
    ESI: d31f4000 EDI: 00322401 EBP: d31f3f10 ESP: d31f3efc
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process cat (pid: 3897, ti=d31f2000 task=d3b3cf20 task.ti=d31f2000)
    Stack:
    d31f4080 ccdb7010 d31f4000 d691fe70 ccdb7010 d31f3f24 c0270e5c d31f4000
    d691fe70 d31f4000 d31f3f34 c02718e8 c12d9e98 d691fe70 d31f3f70 c02bfc33
    00001000 09130000 d3b46e00 d691fe98 00000000 00000079 00000001 00000000
    Call Trace:
    [] ? print_trace_line+0x170/0x17c
    [] ? s_show+0xa7/0xbd
    [] ? seq_read+0x24a/0x327
    [] ? seq_read+0x0/0x327
    [] ? vfs_read+0x86/0xe1
    [] ? sys_read+0x40/0x65
    [] ? sysenter_do_call+0x12/0x3c
    Code: 00 00 00 89 45 ec f7 c7 00 20 00 00 89 55 f0 74 4e f6 86 98 10 00 00 02 74 45 8b 86 8c 10 00 00 8b 9e a8 10 00 00 e8 52 f3 ff ff a3 03 19 c0 85 c0 75 2b 8b 86 8c 10 00 00 8b 9e a8 10 00 00
    EIP: [] print_trace_fmt+0x45/0xe7 SS:ESP 0068:d31f3efc
    CR2: 0000000000000000
    ---[ end trace aa9cf38e5ebed9dd ]---

    This is because we alloc the iter->started cpumask on tracing_pipe_open but
    not on tracing_open.

    It hadn't been noticed until now because we need to have ring buffer overruns
    to activate the starting of cpu buffer detection.

    Also, we need a check to not print the messagge for the first trace on the file.

    Signed-off-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • The wakeup tracing in sched_switch does not stop when a user
    disables tracing. This is because the probe_sched_wakeup() is missing
    the check to prevent the wakeup from being traced.

    Signed-off-by: Zhao Lei
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Building a kernel with tracing can raise the following warning on
    tip/master:

    kernel/trace/trace.c:1249: error: implicit declaration of function 'vbin_printf'

    We are missing an include to string.h

    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: fix time output bug in 32bits system

    ns2usecs() returns 'long', it's incorrect.

    (In i386)
    ...
    -0 [000] 521.442100: _spin_lock -0 [000] 521.442101: do_timer -0 [000] 521.442102: update_wall_time -0 [000] 521.442102: update_xtime_cache <-0 [001] 4154502640.134759: rcu_bh_qsctr_inc -0 [001] 4154502640.134760: _local_bh_enable -0 [001] 4154502640.134761: idle_cpu
    LKML-Reference:
    Reported-by: Li Zefan
    Acked-by: Frederic Weisbecker
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Maneesh Soni was getting a crash when running the wakeup tracer.
    We debugged it down to the recording of the function with the
    CALLER_ADDR2 macro. This is used to get the location of the caller
    to schedule.

    But the problem comes when schedule is called by assmebly. In the case
    that Maneesh had, retint_careful would call schedule. But retint_careful
    does not set up a proper frame pointer. CALLER_ADDR2 is defined as
    __builtin_return_address(2). This produces the following assembly in
    the wakeup tracer code.

    mov 0x0(%rbp),%rcx
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • Merge reason: this used to be a tracing/blktrace-v2 devel topic still
    cooking during the merge window - has propagated to fixes

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • …git/tip/linux-2.6-tip

    * 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    kmemtrace: trace kfree() calls with NULL or zero-length objects
    kmemtrace: small cleanups
    kmemtrace: restore original tracing data binary format, improve ABI
    kmemtrace: kmemtrace_alloc() must fill type_id
    kmemtrace: use tracepoints
    kmemtrace, rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints
    kmemtrace, rcu: fix rcupreempt.c data structure dependencies
    kmemtrace, rcu: fix rcu_tree_trace.c data structure dependencies
    kmemtrace, rcu: fix linux/rcutree.h and linux/rcuclassic.h dependencies
    kmemtrace, mm: fix slab.h dependency problem in mm/failslab.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_unlzma.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_bunzip2.c
    kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_inflate.c
    kmemtrace, squashfs: fix slab.h dependency problem in squasfs
    kmemtrace, befs: fix slab.h dependency problem
    kmemtrace, security: fix linux/key.h header file dependencies
    kmemtrace, fs: fix linux/fdtable.h header file dependencies
    kmemtrace, fs: uninline simple_transaction_set()
    kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h

    Linus Torvalds
     

06 Apr, 2009

1 commit

  • * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (413 commits)
    tracing, net: fix net tree and tracing tree merge interaction
    tracing, powerpc: fix powerpc tree and tracing tree interaction
    ring-buffer: do not remove reader page from list on ring buffer free
    function-graph: allow unregistering twice
    trace: make argument 'mem' of trace_seq_putmem() const
    tracing: add missing 'extern' keywords to trace_output.h
    tracing: provide trace_seq_reserve()
    blktrace: print out BLK_TN_MESSAGE properly
    blktrace: extract duplidate code
    blktrace: fix memory leak when freeing struct blk_io_trace
    blktrace: fix blk_probes_ref chaos
    blktrace: make classic output more classic
    blktrace: fix off-by-one bug
    blktrace: fix the original blktrace
    blktrace: fix a race when creating blk_tree_root in debugfs
    blktrace: fix timestamp in binary output
    tracing, Text Edit Lock: cleanup
    tracing: filter fix for TRACE_EVENT_FORMAT events
    ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release()
    x86: kretprobe-booster interrupt emulation code fix
    ...

    Fix up trivial conflicts in
    arch/parisc/include/asm/ftrace.h
    include/linux/memory.h
    kernel/extable.c
    kernel/module.c

    Linus Torvalds
     

04 Apr, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits)
    trivial: Update my email address
    trivial: NULL noise: drivers/mtd/tests/mtd_*test.c
    trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h
    trivial: Fix misspelling of "Celsius".
    trivial: remove unused variable 'path' in alloc_file()
    trivial: fix a pdlfush -> pdflush typo in comment
    trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL
    trivial: wusb: Storage class should be before const qualifier
    trivial: drivers/char/bsr.c: Storage class should be before const qualifier
    trivial: h8300: Storage class should be before const qualifier
    trivial: fix where cgroup documentation is not correctly referred to
    trivial: Give the right path in Documentation example
    trivial: MTD: remove EOL from MODULE_DESCRIPTION
    trivial: Fix typo in bio_split()'s documentation
    trivial: PWM: fix of #endif comment
    trivial: fix typos/grammar errors in Kconfig texts
    trivial: Fix misspelling of firmware
    trivial: cgroups: documentation typo and spelling corrections
    trivial: Update contact info for Jochen Hein
    trivial: fix typo "resgister" -> "register"
    ...

    Linus Torvalds
     

03 Apr, 2009

7 commits

  • Impact: output all of packet commands - not just the first 4 / 8 bytes

    Since commit d7e3c3249ef23b4617393c69fe464765b4ff1645 ("block: add
    large command support"), struct request->cmd has been changed from
    unsinged char cmd[BLK_MAX_CDB] to unsigned char *cmd.

    v1 -> v2: by: FUJITA Tomonori

    - make sure rq->cmd_len is always intialized, and then we can use
    rq->cmd_len instead of BLK_MAX_CDB.

    Signed-off-by: Li Zefan
    Acked-by: FUJITA Tomonori
    Cc: Arnaldo Carvalho de Melo
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Jens Axboe
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Signed-off-by: Li Zefan
    Cc: Arnaldo Carvalho de Melo
    Cc: "Alan D. Brunelle"
    Cc: Jens Axboe
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • Impact: fix corrupted blkparse output

    Make sure messages from user space are NUL-terminated strings,
    otherwise we could dump random memory to the block trace file.

    Additionally, I've limited the message to BLK_TN_MAX_MSG-1
    characters, because the last character would be stripped by
    vscnprintf anyway.

    Signed-off-by: Carl Henrik Lunde
    Cc: Li Zefan
    Cc: Arnaldo Carvalho de Melo
    Cc: "Alan D. Brunelle"
    Cc: Steven Rostedt
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Carl Henrik Lunde
     
  • Cc: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • When kmemtrace was ported to ftrace, the marker strings were taken as
    an indication of how the traced data was being exposed to the userspace.
    However, the actual format had been binary, not text.

    This restores the original binary format, while also adding an origin CPU
    field (since ftrace doesn't expose the data per-CPU to userspace), and
    re-adding the timestamp field. It also drops arch-independent field
    sizing where it didn't make sense, so pointers won't always be 64 bits
    wide like they used to.

    Signed-off-by: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Eduard - Gabriel Munteanu
     
  • Impact: fix trace output

    kmemtrace_alloc() was not filling type_id, which allowed garbage to make
    it into tracing data.

    Signed-off-by: Eduard - Gabriel Munteanu
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Eduard - Gabriel Munteanu
     
  • kmemtrace now uses tracepoints instead of markers. We no longer need to
    use format specifiers to pass arguments.

    Signed-off-by: Eduard - Gabriel Munteanu
    [ folded: Use the new TP_PROTO and TP_ARGS to fix the build. ]
    [ folded: fix build when CONFIG_KMEMTRACE is disabled. ]
    [ folded: define tracepoints when CONFIG_TRACEPOINTS is enabled. ]
    Signed-off-by: Pekka Enberg
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Eduard - Gabriel Munteanu
     

01 Apr, 2009

2 commits

  • Impact: prevent possible memory leak

    The reader page of the ring buffer is special. Although it points
    into the ring buffer, it is not part of the actual buffer. It is
    a page used by the reader to swap with a page in the ring buffer.
    Once the swap is made, the new reader page is again outside the
    buffer.

    Even though the reader page points into the buffer, it is really
    pointing to residual data. Note, this data is used by the reader.

    reader page
    |
    v
    (prev) +---+ (next)
    +----------| |----------+
    | +---+ |
    v v
    +---+ +---+ +---+
    -->| |------->| |------->| |--->

    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • Impact: fix to permanent disabling of function graph tracer

    There should be nothing to prevent a tracer from unregistering a
    function graph callback more than once. This can simplify error paths.

    But currently, the counter does not account for mulitple unregistering
    of the function graph callback. If it happens, the function graph
    tracer will be permanently disabled.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

31 Mar, 2009

3 commits