[PATCH] ftrace: printk formatting infrastructure fix 2 - Kernel

This is a discussion on [PATCH] ftrace: printk formatting infrastructure fix 2 - Kernel ; Hi, akpm@linux-foundation.org writes: > The mm-of-the-moment snapshot 2008-08-06-14-20 has been uploaded to > > http://userweb.kernel.org/~akpm/mmotm/ > > It contains the following patches against 2.6.27-rc2: > > feature-removal-scheduletxt-remove-the-ncr53c9x-entry.patch > hugetlb-call-arch_prepare_hugepage-for-surplus-pages.patch > quota-documentation-for-sending-below-quota-messages-via-netlink-and-tiny-doc-update.patch > page-allocator-use-no-panic-variant-of-alloc_bootmem-in-alloc_large_system_hash.patch > cpu-hotplug-s390-doesnt-support-additional_cpus-anymore.patch > radeonfb-fix-copyarea-for-r300-and-later.patch > memcg-fix-oops-in-mem_cgroup_shrink_usage.patch > ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [PATCH] ftrace: printk formatting infrastructure fix 2

  1. [PATCH] ftrace: printk formatting infrastructure fix 2

    Hi,

    akpm@linux-foundation.org writes:

    > The mm-of-the-moment snapshot 2008-08-06-14-20 has been uploaded to
    >
    > http://userweb.kernel.org/~akpm/mmotm/
    >
    > It contains the following patches against 2.6.27-rc2:
    >
    > feature-removal-scheduletxt-remove-the-ncr53c9x-entry.patch
    > hugetlb-call-arch_prepare_hugepage-for-surplus-pages.patch
    > quota-documentation-for-sending-below-quota-messages-via-netlink-and-tiny-doc-update.patch
    > page-allocator-use-no-panic-variant-of-alloc_bootmem-in-alloc_large_system_hash.patch
    > cpu-hotplug-s390-doesnt-support-additional_cpus-anymore.patch
    > radeonfb-fix-copyarea-for-r300-and-later.patch
    > memcg-fix-oops-in-mem_cgroup_shrink_usage.patch
    > sm501-update-debugging-low-information-messages.patch
    > seq_file-fix-bug-when-seq_read-reads-nothing.patch
    > repeatable-slab-corruption-with-ltp-msgctl08.patch
    > linux-next.patch
    > next-remove-localversion.patch
    > acpi-add-checking-for-null-early-param.patch
    > mm-only-enforce-acpi-resource-conflict-checks.patch
    > calgary-fix-a-comparison-warning-the-pci-calgary-64-driver.patch
    > x86-remove-init_mm-export-as-planned-for-2626.patch
    > use-warn-in-arch-x86-mm-ioremapc.patch
    > use-warn-in-arch-x86-mm-pageattrc.patch
    > use-warn-in-arch-x86-kernel.patch
    > arch-x86-pci-irqc-attempt-to-clean-up-code-layout.patch
    > i386-vmalloc-size-fix.patch
    > zero-based-percpu-use-vmlinux_symbol-in-include-asm-generic-vmlinuxldsh.patch
    > x86-64-fix-overlap-of-modules-and-fixmap-areas.patch
    > x86_64-remove-empty-lines-from-stack-traces-oopses.patch
    > x86-tracehook_signal_handler.patch
    > x86-tracehook-syscall.patch
    > x86-tracehook-asm-syscallh.patch
    > x86-signals-use-asm-syscallh.patch
    > x86-tracehook-tif_notify_resume.patch
    > x86-tracehook-config_have_arch_tracehook.patch
    > hda_intel-enable-snoop-for-nvidia-hda-controller.patch
    > cifs-remove-global_extern-macro.patch
    > cifs-fix-range-check.patch
    > pcmcia-pccard-deadlock-fix.patch
    > ppc-use-the-common-ascii-hex-helpers.patch
    > powerpc-replace-__function__-with-__func__.patch
    > v4l-link-tuner-before-saa7134.patch
    > v4l-drx397xdc-sparse-annotations.patch
    > i2c-renesas-highlander-fpga-smbus-support.patch
    > i2c-renesas-highlander-fpga-smbus-support-update.patch
    > i2c-renesas-highlander-fpga-smbus-support-update-fix.patch
    > hid-wellspring-device-quirks.patch
    > add-time_is_after_jiffies-and-others-which-compare-with-jiffies.patch
    > ntp-let-update_persistent_clock-sleep.patch
    > migrate_timers-add-comment-use-spinlock_irq.patch
    > tick-schedc-suppress-needless-timer-reprogramming.patch
    > timekeeping-fix-rounding-problem-during-clock-update.patch
    > git-ia64.patch
    > drivers-input-serio-xilinx_ps2c-fix-warning.patch
    > wistron_btns-add-support-for-fujitsu-siemens-amilo-pro-edition-v3505.patch
    > elantech-touchpad-driver.patch
    > input-touchscreen-driver-add-support-ad7877-touchscreen-driver.patch
    > input-bcm5974-055-smoother-motion-irq-simplification.patch
    > input-ads7846c-sparse-lock-annotation.patch
    > git-jg-misc.patch
    > git-kbuild-fixes.patch
    > genksyms-track-symbol-checksum-changes.patch
    > genksyms-allow-to-ignore-symbol-checksum-changes.patch
    > lkdtm-fix-for-config_scsi=n.patch
    > git-lblnet.patch
    > git-libata-all.patch
    > libata-scsi-dont-start-hotplug-work-queue-if-hotplug-is-disabled.patch
    > sata_viac-add-support-for-vt8251-fix-the-internal-chips-issue-and.patch
    > m32r-remove-the-unused-nohighmem-option.patch
    > m32r-dont-offer-config_isa.patch
    > mmc-fix-clock-off-in-pxa255-270.patch
    > git-ubi.patch
    > git-ubi-git-rejects.patch
    > configure-out-igmp-support.patch
    > acpi-compal-laptop-use-rfkill-switch-subsystem.patch
    > forcedeth-power-down-phy-when-interface-is-down.patch
    > forcedeth-fix-mac-address-detection-on-network-card-regression-in-2623.patch
    > sundance-set-carrier-status-on-link-change-events.patch
    > via-velocity-give-a-structure-to-the-rx-tx-fields.patch
    > via-velocity-fix-sleep-with-spinlock-bug-during-mtu-change.patch
    > hamradio-add-missing-sanity-check-to-tty-operation.patch
    > skge-adapt-skge-to-use-reworked-pci-pm.patch
    > cassini-use-request_firmware.patch
    > pegasus-add-blacklist-support-to-fix-belkin-bluetooth-dongle.patch
    > drivers-net-replace-__function__-with-__func__.patch
    > e1000e-convert-ndev_-printks-to-something-smaller.patch
    > e1000e-perform-basic-82573-eeprom-checks-for-known-issues.patch
    > e1000e-fix-drv-load-issues.patch
    > e1000e-remove-inapplicable-test-for-ioport.patch
    > e1000e-remove-inapplicable-test-for-ioport-checkpatch-fixes.patch
    > sky2-adapt-to-use-reworked-pci-pm-code.patch
    > e1000e-make-e1000e-default-to-the-same-kconfig-setting-as-e1000.patch
    > 3x59x-fix-pci-resource-management.patch
    > smc-ultra-get-rid-of-eth%d-message.patch
    > nfs-err_ptr-is-expected-on-failure-from-nfs_do_clone_mount.patch
    > sunrpc-do-not-pin-sunrpc-module-in-the-memory.patch
    > git-parisc.patch
    > pciidsh-remove-a-duplicated-symbol.patch
    > use-warn-in-kernel-lockdepc.patch
    > sched-do_wait_for_common-use-signal_pending_state.patch
    > wait_task_inactive-dont-consider-task-nivcsw.patch
    > wait_task_inactive-improve-the-returned-value-for-nvcsw-==-0.patch
    > wait_task_inactive-fix-the-config_smp-version.patch
    > sched-type-fix.patch
    > lockdep-fix-combinatorial-explosion-in-lock-subgraph-traversal.patch
    > lockdep-fix-combinatorial-explosion-in-lock-subgraph-traversal-fix.patch
    > lockdep-lock_set_subclass-reset-a-held-locks-subclass.patch
    > lockdep-re-annotate-scheduler-runqueues.patch
    > lockdep-shrink-held_lock-structure.patch
    > lockdep-shrink-held_lock-structure-fix.patch
    > lockdep-shrink-held_lock-structure-fix-2.patch
    > lockdep-map_acquire.patch
    > lockdep-lock-protection-locks.patch
    > lockdep-spin_lock_nest_lock.patch
    > netfilter-conntrack_helper-needs-to-include-rculisth.patch
    > rcu-just-rename-call_rcu_bh-instead-of-making-it-a-macro.patch
    > rcu-trace-fix-possible-mem-leak.patch
    > ftrace-new-continue-entry-separate-out-from-trace_entry.patch
    > ftrace-printk-formatting-infrastructure.patch


    ---
    The attribute on the function definition breaks compilation. Instead of
    removing it, we could use a declaration and add the attribute there, but
    then, when someone adds new ftrace_printk()s, she will probably compile
    with CONFIG_TRACING and the callsite is garuanteed to be verified during
    development.

    Signed-off-by: Johannes Weiner
    ---
    include/linux/ftrace.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/include/linux/ftrace.h
    +++ b/include/linux/ftrace.h
    @@ -165,7 +165,7 @@ __ftrace_printk(unsigned long ip, const
    static inline void
    ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
    static inline int
    -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)))
    +ftrace_printk(const char *fmt, ...)
    {
    return 0;
    }
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] ftrace: printk formatting infrastructure fix 2

    Hi Andrew,

    [sorry, screwed up the recpt list before....]

    Johannes Weiner writes:

    > Hi,
    >
    > akpm@linux-foundation.org writes:
    >
    >> ftrace-new-continue-entry-separate-out-from-trace_entry.patch
    >> ftrace-printk-formatting-infrastructure.patch

    >
    > ---
    > The attribute on the function definition breaks compilation. Instead of
    > removing it, we could use a declaration and add the attribute there, but
    > then, when someone adds new ftrace_printk()s, she will probably compile
    > with CONFIG_TRACING and the callsite is garuanteed to be verified during
    > development.
    >
    > Signed-off-by: Johannes Weiner
    > ---
    > include/linux/ftrace.h | 2 +-
    > 1 file changed, 1 insertion(+), 1 deletion(-)
    >
    > --- a/include/linux/ftrace.h
    > +++ b/include/linux/ftrace.h
    > @@ -165,7 +165,7 @@ __ftrace_printk(unsigned long ip, const
    > static inline void
    > ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3) { }
    > static inline int
    > -ftrace_printk(const char *fmt, ...) __attribute__ ((format (printf, 1, 0)))
    > +ftrace_printk(const char *fmt, ...)
    > {
    > return 0;
    > }


    Still needed, get this with mmotm-2008-08-08-00-56 and !CONFIG_TRACING:

    In file included from kernel/sched.c:74:
    include/linux/ftrace.h:169: error: expected ‘,’ or ‘;’ before ‘{’ token
    make[1]: *** [kernel/sched.o] Error 1
    make: *** [kernel] Error 2

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

  3. Re: [PATCH] ftrace: printk formatting infrastructure fix 2



    On Mon, 11 Aug 2008, Andrew Morton wrote:

    > On Fri, 08 Aug 2008 12:47:52 +0200
    > Johannes Weiner wrote:


    > My attempts to generate a suitable config were not happy ones. Feast
    > your eyes upon this monstrosity:
    >
    > Symbol: TRACING [=y]
    > Selects: DEBUG_FS && STACKTRACE
    > Selected by: FTRACE && HAVE_FTRACE || IRQSOFF_TRACER && TRACE_IRQFLAGS_SUPPORT && GENERIC_TIME && HAVE_FTRACE || PREEMPT_TRACER && GENERIC_TIME && PREEMPT && HAVE_FTRACE || SYSPROF_TRACER && X86 || SCHED_TRACER && HAVE_FTRACE || CONTEXT_SWITCH_TRACER && HAVE_FTRACE || MMIOTRACE && DEBUG_KERNEL && PCI
    >


    This isn't as bad as it looks.

    Yes tracing selects DEBUG_FS and STACKTRACE, but the TRACING is required
    to transcend into the kernel/trace directory. That is where the other
    tracers live, and some tracers require other options to be set.

    ie. FTRACE requires HAVE_FTRACE, PREEMPT_TRACER requires PREEMPT, etc.

    I don't really see a problem with those config dependencies.

    -- Steve



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

+ Reply to Thread