24 May, 2012

2 commits

  • Pull trivial ktest spelling fix from Steven Rostedt:
    "I promised Jesper that I would push this for 3.5, but forgot to add it
    to my queue. It's just a spelling fix, but it should go in regardless
    to hide my inability to get words in the English language correct."

    Becuse gud spealing is impurtunt.

    * tag 'ktest-v3.5-spelling' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Change singular "paranthesis" to plural "parentheses"

    Linus Torvalds
     
  • …rnel.org/pub/scm/linux/kernel/git/tip/tip

    Pull perf fixes from Ingo Molnar:

    - Leftover AMD PMU driver fix fix from the end of the v3.4
    stabilization cycle.

    - Late tools/perf/ changes that missed the first round:
    * endianness fixes
    * event parsing improvements
    * libtraceevent fixes factored out from trace-cmd
    * perl scripting engine fixes related to libtraceevent,
    * testcase improvements
    * perf inject / pipe mode fixes
    * plus a kernel side fix

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86: Update event scheduling constraints for AMD family 15h models

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    Revert "sched, perf: Use a single callback into the scheduler"
    perf evlist: Show event attribute details
    perf tools: Bump default sample freq to 4 kHz
    perf buildid-list: Work better with pipe mode
    perf tools: Fix piped mode read code
    perf inject: Fix broken perf inject -b
    perf tools: rename HEADER_TRACE_INFO to HEADER_TRACING_DATA
    perf tools: Add union u64_swap type for swapping u64 data
    perf tools: Carry perf_event_attr bitfield throught different endians
    perf record: Fix documentation for branch stack sampling
    perf target: Add cpu flag to sample_type if target has cpu
    perf tools: Always try to build libtraceevent
    perf tools: Rename libparsevent to libtraceevent in Makefile
    perf script: Rename struct event to struct event_format in perl engine
    perf script: Explicitly handle known default print arg type
    perf tools: Add hardcoded name term for pmu events
    perf tools: Separate 'mem:' event scanner bits
    perf tools: Use allocated list for each parsed event
    perf tools: Add support for displaying event parser debug info
    perf test: Move parse event automated tests to separated object

    Linus Torvalds
     

23 May, 2012

7 commits

  • Acked-by: Randy Dunlap
    Signed-off-by: Jesper Juhl
    Signed-off-by: Steven Rostedt

    Jesper Juhl
     
  • Pull scheduler changes from Ingo Molnar:
    "The biggest change is the cleanup/simplification of the load-balancer:
    instead of the current practice of architectures twiddling scheduler
    internal data structures and providing the scheduler domains in
    colorfully inconsistent ways, we now have generic scheduler code in
    kernel/sched/core.c:sched_init_numa() that looks at the architecture's
    node_distance() parameters and (while not fully trusting it) deducts a
    NUMA topology from it.

    This inevitably changes balancing behavior - hopefully for the better.

    There are various smaller optimizations, cleanups and fixlets as well"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Taint kernel with TAINT_WARN after sleep-in-atomic bug
    sched: Remove stale power aware scheduling remnants and dysfunctional knobs
    sched/debug: Fix printing large integers on 32-bit platforms
    sched/fair: Improve the ->group_imb logic
    sched/nohz: Fix rq->cpu_load[] calculations
    sched/numa: Don't scale the imbalance
    sched/fair: Revert sched-domain iteration breakage
    sched/x86: Rewrite set_cpu_sibling_map()
    sched/numa: Fix the new NUMA topology bits
    sched/numa: Rewrite the CONFIG_NUMA sched domain support
    sched/fair: Propagate 'struct lb_env' usage into find_busiest_group
    sched/fair: Add some serialization to the sched_domain load-balance walk
    sched/fair: Let minimally loaded cpu balance the group
    sched: Change rq->nr_running to unsigned int
    x86/numa: Check for nonsensical topologies on real hw as well
    x86/numa: Hard partition cpu topology masks on node boundaries
    x86/numa: Allow specifying node_distance() for numa=fake
    x86/sched: Make mwait_usable() heed to "idle=" kernel parameters properly
    sched: Update documentation and comments
    sched_rt: Avoid unnecessary dequeue and enqueue of pushable tasks in set_cpus_allowed_rt()

    Linus Torvalds
     
  • Pull perf changes from Ingo Molnar:
    "Lots of changes:

    - (much) improved assembly annotation support in perf report, with
    jump visualization, searching, navigation, visual output
    improvements and more.

    - kernel support for AMD IBS PMU hardware features. Notably 'perf
    record -e cycles:p' and 'perf top -e cycles:p' should work without
    skid now, like PEBS does on the Intel side, because it takes
    advantage of IBS transparently.

    - the libtracevents library: it is the first step towards unifying
    tracing tooling and perf, and it also gives a tracing library for
    external tools like powertop to rely on.

    - infrastructure: various improvements and refactoring of the UI
    modules and related code

    - infrastructure: cleanup and simplification of the profiling
    targets code (--uid, --pid, --tid, --cpu, --all-cpus, etc.)

    - tons of robustness fixes all around

    - various ftrace updates: speedups, cleanups, robustness
    improvements.

    - typing 'make' in tools/ will now give you a menu of projects to
    build and a short help text to explain what each does.

    - ... and lots of other changes I forgot to list.

    The perf record make bzImage + perf report regression you reported
    should be fixed."

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (166 commits)
    tracing: Remove kernel_lock annotations
    tracing: Fix initial buffer_size_kb state
    ring-buffer: Merge separate resize loops
    perf evsel: Create events initially disabled -- again
    perf tools: Split term type into value type and term type
    perf hists: Fix callchain ip printf format
    perf target: Add uses_mmap field
    ftrace: Remove selecting FRAME_POINTER with FUNCTION_TRACER
    ftrace/x86: Have x86 ftrace use the ftrace_modify_all_code()
    ftrace: Make ftrace_modify_all_code() global for archs to use
    ftrace: Return record ip addr for ftrace_location()
    ftrace: Consolidate ftrace_location() and ftrace_text_reserved()
    ftrace: Speed up search by skipping pages by address
    ftrace: Remove extra helper functions
    ftrace: Sort all function addresses, not just per page
    tracing: change CPU ring buffer state from tracing_cpumask
    tracing: Check return value of tracing_dentry_percpu()
    ring-buffer: Reset head page before running self test
    ring-buffer: Add integrity check at end of iter read
    ring-buffer: Make addition of pages in ring buffer atomic
    ...

    Linus Torvalds
     
  • Pull USB 3.5-rc1 changes from Greg Kroah-Hartman:
    "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.

    It's touches a lot of different parts of the kernel, all USB drivers,
    due to some API cleanups (getting rid of the ancient err() macro) and
    some changes that are needed for USB 3.0 power management updates.

    There are also lots of new drivers, pimarily gadget, but others as
    well. We deleted a staging driver, which was nice, and finally
    dropped the obsolete usbfs code, which will make Al happy to never
    have to touch that again.

    There were some build errors in the tree that linux-next found a few
    days ago, but those were fixed by the most recent changes (all were
    due to us not building with CONFIG_PM disabled.)

    Signed-off-by: Greg Kroah-Hartman "

    * tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits)
    xhci: Fix DIV_ROUND_UP compile error.
    xhci: Fix compile with CONFIG_USB_SUSPEND=n
    USB: Fix core compile with CONFIG_USB_SUSPEND=n
    brcm80211: Fix compile error for .disable_hub_initiated_lpm.
    Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
    MAINTAINERS: Add myself as maintainer to the USB PHY Layer
    USB: EHCI: fix command register configuration lost problem
    USB: Remove races in devio.c
    USB: ehci-platform: remove update_device
    USB: Disable hub-initiated LPM for comms devices.
    xhci: Add Intel U1/U2 timeout policy.
    xhci: Add infrastructure for host-specific LPM policies.
    USB: Add macros for interrupt endpoint types.
    xhci: Reserve one command for USB3 LPM disable.
    xhci: Some Evaluate Context commands must succeed.
    USB: Disable USB 3.0 LPM in critical sections.
    USB: Add support to enable/disable USB3 link states.
    USB: Allow drivers to disable hub-initiated LPM.
    USB: Calculate USB 3.0 exit latencies for LPM.
    USB: Refactor code to set LPM support flag.
    ...

    Conflicts:
    arch/arm/mach-exynos/mach-nuri.c
    arch/arm/mach-exynos/mach-universal_c210.c
    drivers/net/wireless/ath/ath6kl/usb.c

    Linus Torvalds
     
  • There was no easy way to see the frequency used, and with the change of
    default, we better provide one.

    [root@sandy linux]# perf evlist -F
    cycles: sample_freq=4000
    [root@sandy linux]# perf evlist -v
    cycles: sample_freq=4000, size: 80, sample_type: 391, read_format: 7, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, sample_id_all: 1, exclude_guest: 1
    [root@sandy linux]#

    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-e1p9poez3nwrgycbmwqmhlsu@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Quoting Ingo:

    "While at it I'd also suggest increasing the default sampling frequency,
    from 1000 Hz per CPU to at least 4Khz auto-freq or so - this should work
    well all across the board I think. CPUs are getting faster and command/app
    run times are getting shorter, 1Khz is a bit low IMO."

    Requested-by: Ingo Molnar
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-2jafa6mkrufyekny9ei59lpu@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • In order for perf buildid-list to work with pipe-mode files, it needs to
    process buildids and event attr structs.

    $ perf record -o - noploop 2 | ./perf inject -b | perf buildid-list -i - -H
    noploop for 2 seconds
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.084 MB - (~3678 samples) ]
    0000000000000000000000000000000000000000 [kernel.kallsyms]
    3a0d0629efe74a8da3eeba372cdbd74ad9b8f5d5 /usr/local/bin/noploop

    The reason [kernel.kallsyms] shows a 0 build-id comes from the
    way buildids are injected in the stream.

    The buildid for the kernel is provided by a BUILD_ID record. The
    [kernel.kallsyms] is provided by a MMAP record. There is no clean and
    obvious way to link the two, unfortunately.

    In regular mode, the kernel buildid is generated from reading the ELF
    image or kallsyms and perf knows to associate [kernel.kallsyms] to it.
    Later on, when perf processes the [kernel.kallsyms] MMAP record, it will
    already have a dso for it.

    So for now, make sure perf buildid-list shows the buildids for
    everything but the kernel image.

    Signed-off-by: Stephane Eranian
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337081295-10303-6-git-send-email-eranian@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

22 May, 2012

24 commits

  • In __perf_session__process_pipe_events(), there was a risk we would read
    more than what a union perf_event struct can hold. this could happen in
    case, perf is reading a file which contains new record types it does not
    know about and which are larger than anything it knows about.

    In general, perf is supposed to skip records it does not understand, but
    in pipe mode, those have to be read and ignored. The fixed size header
    contains the size of the record, but that size may be larger than union
    perf_event, yet it was used as the backing to the read in:

    union perf_event event;
    void *p;

    size = event->header.size;

    p = &event;
    p += sizeof(struct perf_event_header);
    if (size - sizeof(struct perf_event_header)) {
    err = readn(self->fd, p, size - sizeof(struct perf_event_header));

    We fix this by allocating a buffer based on the size reported in the
    header. We reuse the buffer as much as we can. We realloc in case it
    becomes too small. In the common case, the performance impact is
    negligible.

    Signed-off-by: Stephane Eranian
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337081295-10303-3-git-send-email-eranian@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • perf inject -b was broken. It would not inject any build_id into the
    stream. Furthermore, it would strip samples from the stream.

    The reason was a missing initialization of the event attribute
    structure. The perf_tool.tool.attr() callback was pointing to a simple
    repipe. But there was no initialization of the internal data structures
    to keep track of events and event ids. That later caused event id
    lookups to fail, and sample would get removed.

    The patch simply adds back the call to perf_event__process_attr() to
    initialize the evlist structure and now build_ids are again injected.

    Signed-off-by: Stephane Eranian
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337081295-10303-2-git-send-email-eranian@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • To match the PERF_RECORD_HEADER_TRACING_DATA record type.

    This is the same info as the one used for pipe mode whereas the other
    one is for regular file output. This will help in the later patch to add
    meta-data infos in pipe mode.

    Signed-off-by: Stephane Eranian
    Cc: David Ahern
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337081295-10303-4-git-send-email-eranian@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     
  • The following union:
    union {
    u64 val64;
    u32 val32[2];
    } u;

    is used on more than one place in perf code and will be used more in
    upcomming patches.

    Adding union u64_swap to have it defined globaly so we dont need to
    redefine it all the time.

    Signed-off-by: Jiri Olsa
    Reviewed-by: David Ahern
    Tested-by: David Ahern
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337151548-2396-4-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • When the perf data file is read cross architectures, the
    perf_event__attr_swap function takes care about endianness of all the
    struct fields except the bitfield flags.

    The bitfield flags need to be transformed as well, since the bitfield
    binary storage differs for both endians.

    ABI says:
    Bit-fields are allocated from right to left (least to most significant)
    on little-endian implementations and from left to right (most to least
    significant) on big-endian implementations.

    The above seems to be byte specific, so we need to reverse each byte of
    the bitfield. 'Internet' also says this might be implementation specific
    and we probably need proper fix and carry perf_event_attr bitfield flags
    in separate data file FEAT_ section. Thought this seems to work for now.

    Note, running following to test perf endianity handling:
    test 1)
    - origin system:
    # perf record -a -- sleep 10 (any perf record will do)
    # perf report > report.origin
    # perf archive perf.data

    - copy the perf.data, report.origin and perf.data.tar.bz2
    to a target system and run:
    # tar xjvf perf.data.tar.bz2 -C ~/.debug
    # perf report > report.target
    # diff -u report.origin report.target

    - the diff should produce no output
    (besides some white space stuff and possibly different
    date/TZ output)

    test 2)
    - origin system:
    # perf record -ag -fo /tmp/perf.data -- sleep 1
    - mount origin system root to the target system on /mnt/origin
    - target system:
    # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
    --kallsyms /mnt/origin/proc/kallsyms
    - complete perf.data header is displayed

    Signed-off-by: Jiri Olsa
    Reviewed-by: David Ahern
    Tested-by: David Ahern
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337151548-2396-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Signed-off-by: Anshuman Khandual
    Acked-by: Stephane Eranian
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/4FB60C7A.2080508@linux.vnet.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Anshuman Khandual
     
  • Pull ktest updates from Steven Rostedt.

    * tag 'ktest-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Add README to explain what is in the examples directory
    ktest: Add the snowball.conf example config
    ktest: Add an example config that does cross compiling of several archs
    ktest: Add kvm.conf example config
    ktest: Add useful example configs
    ktest: Add USE_OUTPUT_MIN_CONFIG to avoid prompt on make_min_config
    ktest: Add MIN_CONFIG_TYPE to allow making a minum .config that has network
    ktest: Fix kernelrevision with POST_BUILD

    Linus Torvalds
     
  • Add PERF_SAMPLE_CPU flag into attr->sample_type if an user specified any
    of cpu target (either system-wide or cpu list).

    It will show correct values when cpu sort key is given for perf top and
    perf report.

    Signed-off-by: Namhyung Kim
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337564527-9367-1-git-send-email-namhyung.kim@lge.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Although perf depends on the libtraceevent, it cannot know when it needs
    to be rebuilt. So just try to rebuild it always in order to make sure we
    use the latest version.

    While at it, silence annoying directory change messages.

    Signed-off-by: Namhyung Kim
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1337677434-4881-2-git-send-email-namhyung.kim@lge.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • Change some variable names according to new library name.

    Signed-off-by: Namhyung Kim
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1337677434-4881-1-git-send-email-namhyung.kim@lge.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • While migrating to the libtraceevent, the perl scripting engine
    missed this structure rename.

    This fixes:

    util/scripting-engines/trace-event-perl.c: In function "find_cache_event":
    util/scripting-engines/trace-event-perl.c:244: error: assignment from incompatible pointer type
    util/scripting-engines/trace-event-perl.c:248: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:248: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:250: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c: In function "perl_process_tracepoint":
    util/scripting-engines/trace-event-perl.c:286: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:286: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:307: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c: In function "perl_generate_script":
    util/scripting-engines/trace-event-perl.c:498: error: passing argument 1 of "trace_find_next_event" from incompatible pointer type
    util/scripting-engines/../trace-event.h:56: note: expected "struct event_format *" but argument is of type "struct event *"
    util/scripting-engines/trace-event-perl.c:498: error: assignment from incompatible pointer type
    util/scripting-engines/trace-event-perl.c:499: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:499: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:513: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:532: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:556: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:569: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:570: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:579: error: dereferencing pointer to incomplete type
    util/scripting-engines/trace-event-perl.c:580: error: dereferencing pointer to incomplete type

    Reported-by: Arnaldo Carvalho de Melo
    Signed-off-by: Frederic Weisbecker
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    Link: http://lkml.kernel.org/r/1337697049-30251-2-git-send-email-fweisbec@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Frederic Weisbecker
     
  • Handle the print argument types brought by the new libparsevent in perl
    scripting engine.

    PRINT_BSTRING and PRINT_DYNAMIC_ARRAY are treated just like strings
    and thus don't require specific processing.

    But PRINT_FUNC need specific plugins which are not yet handled, lets
    warn if we meet this case.

    This fixes:

    util/scripting-engines/trace-event-perl.c: In function define_event_symbol:
    util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_BSTRING not handled in switch
    util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_DYNAMIC_ARRAY not handled in switch
    util/scripting-engines/trace-event-perl.c:188: error: enumeration value PRINT_FUNC not handled in switch

    Reported-by: Arnaldo Carvalho de Melo
    Signed-off-by: Frederic Weisbecker
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: Tom Zanussi
    Link: http://lkml.kernel.org/r/1337697049-30251-1-git-send-email-fweisbec@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Frederic Weisbecker
     
  • Adding a new hardcoded term 'name' allowing to specify a name for the
    pmu event. The term is defined along with standard pmu terms. If no
    'name' term is given, the event name follows following template:

    "raw 0x"

    running:
    perf stat -e cpu/config=1,name=krava1/u ls

    will produce following output:
    ...
    Performance counter stats for 'ls':
    0 krava1
    ...

    running:
    perf stat -e cpu/config=1/u ls

    will produce following output:
    ...
    Performance counter stats for 'ls':
    0 raw 0x1
    ...

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337584373-2741-6-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Separating 'mem:' scanner processing, so we can parse out modifier
    specifically and dont clash with other rules.

    This is just precaution for the future, so we dont need to worry about
    the rules clashing where we need to parse out any sub-rule of global
    rules.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337584373-2741-5-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Switch from using static temporary event list into dynamically allocated
    one. This way we dont need to pass temp list to the parse_events_parse
    which makes the interface more clear.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337584373-2741-4-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Adding PARSER_DEBUG Makefile variable to enable building event scanner/
    parser with debug enabled. This results in verbose output right out of
    the scanner/parser.

    It's useful for debuging the event parser. Keeping this only for event
    parser so far.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337584373-2741-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Moving event parsing specific tests into separated file:

    util/parse-events-test.c

    Also changing the code a bit to ease running separate tests.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337584373-2741-2-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add a README that explains what the different example configs in the
    ktest example directory are about.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • I used the snowball.conf in a live demo that demonstrated how to use
    ktest.pl with a snowball ARM board. I've been asked to included that
    config in the ktest repository.

    Here it is.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Add the config that I use to test several archs. I downloaded several
    cross compilers from:

    http://kernel.org/pub/tools/crosstool/files/bin/x86_64/

    and this config is an example to crosscompile several archs to make sure
    that your changes do not break archs that you are not working on.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Add an example config that explains how to use ktest with a virtual
    guest as the target.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • I've been asked several times to provide more useful example configs for
    ktest.pl, as the sample.conf is too complex (because it explains all
    configs). This adds configs broken up by use case, and these configs are
    based on actual configs that I use on a daily basis.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • If the file that OUTPUT_MIN_CONFIG exists then ktest.pl will prompt the
    user and ask them if the OUTPUT_MIN_CONFIG should be used as the
    starting point for make_min_config instead of MIN_CONFIG.

    This is usually the case, and to allow the user to do so, which is
    helpful if the user is creating different min configs based on tests,
    and they know one is a superset of another test, they can set
    USE_OUTPUT_MIN_CONFIG to one, which will prevent kest.pl from prompting
    to use the OUTPUT_MIN_CONFIG and it will just use it.

    If USE_OUTPUT_MIN_CONIFG is set to zero, then ktest.pl will continue to
    use MIN_CONFIG instead.

    The default is that USE_OUTPUT_MIN_CONFIG is undefined.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Add a MIN_CONFIG_TYPE that can be set to 'test' or 'boot'. The default
    is 'boot' which is what make_min_config has done previously: makes a
    config file that is the minimum needed to boot the target.

    But when MIN_CONFIG_TYPE is set to 'test', not only must the target
    boot, but it must also successfully run the TEST. This allows the
    creation of a config file that is the minimum to boot and also
    perform ssh to the target, or anything else a developer wants.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

21 May, 2012

2 commits


19 May, 2012

3 commits

  • 764e16a changed perf-record to create events disabled by default and
    enable them once perf initializations are done. This setting was dropped
    by 0f82ebc. Now perf events are once again generated during perf's
    initialization phase (e.g., generating maps).

    As an example, perf opens a lot of files at startup. Unpatched:

    perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.087 MB /tmp/perf.data (~3798 samples) ]

    Using perf-script to look at the samples shows the perf command generating
    563 of the 566 total events.

    Patched:

    perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
    [ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.028 MB /tmp/perf.data (~1206 samples) ]

    Using perf-script to look at the samples does not show perf command.

    Signed-off-by: David Ahern
    Link: http://lkml.kernel.org/r/1336968088-11531-1-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     
  • The PRE_BUILD and POST_BUILD options of ktest are added to allow the
    user to add temporary patch to the system and remove it on builds. This
    is sometimes use to take a change from another git branch and add it to
    a series without the fix so that this series can be tested, when an
    unrelated bug exists in the series.

    The problem comes when a tagged commit is being used. For example, if
    v3.2 is being tested, and we add a patch to it, the kernelrelease for
    that commit will be 3.2.0+, but without the patch the version will be
    3.2.0. This can cause problems when the kernelrelease is determined for
    creating the /lib/modules directory. The kernel booting has the '+' but
    the module directory will not, and the modules will be missing for that
    boot, and may not allow the kernel to succeed.

    The fix is to put the creation of the kernelrelease in the POST_BUILD
    logic, before it applies the POST_BUILD operation. The POST_BUILD is
    where the patch may be removed, removing the '+' from the kernelrelease.

    The calculation of the kernelrelease will also stay in its current
    location but will be ignored if it was already calculated previously.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Merge reason: We are going to queue up a dependent patch:

    "perf tools: Move parse event automated tests to separated object"

    That depends on:

    commit e7c72d8
    perf tools: Add 'G' and 'H' modifiers to event parsing

    Conflicts:
    tools/perf/builtin-stat.c

    Conflicted with the recent 'perf_target' patches when checking the
    result of perf_evsel open routines to see if a retry is needed to cope
    with older kernels where the exclude guest/host perf_event_attr bits
    were not used.

    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

18 May, 2012

2 commits

  • Introducing type_val and type_term for term instead of a single type
    value. Currently the term type marked out the value type as well.

    With this change we can have future string term values being specified
    by user and translated into proper number along the processing.

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1335371102-11358-2-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • The callchain address is stored as u64. Current code uses following
    format string to display callchain address:

    "%p\n", (void *)(long)chain->ip

    This way we lose upper 32 bits if we report 64 bit addresses in 32 bit
    environment. Fixing this to always display whole 64 bits.

    Note, running following to test perf endianity handling:
    test 1)
    - origin system:
    # perf record -a -- sleep 10 (any perf record will do)
    # perf report > report.origin
    # perf archive perf.data

    - copy the perf.data, report.origin and perf.data.tar.bz2
    to a target system and run:
    # tar xjvf perf.data.tar.bz2 -C ~/.debug
    # perf report > report.target
    # diff -u report.origin report.target

    - the diff should produce no output
    (besides some white space stuff and possibly different
    date/TZ output)

    test 2)
    - origin system:
    # perf record -ag -fo /tmp/perf.data -- sleep 1
    - mount origin system root to the target system on /mnt/origin
    - target system:
    # perf script --symfs /mnt/origin -I -i /mnt/origin/tmp/perf.data \
    --kallsyms /mnt/origin/proc/kallsyms
    - complete perf.data header is displayed

    Signed-off-by: Jiri Olsa
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1337151548-2396-8-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa