17 Dec, 2014

1 commit


12 Dec, 2014

3 commits

  • …/acme/linux into perf/urgent

    Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

    User visible changes:

    - Mark events as (x86 only) in help output for 'perf kvm stat live" (Alexander Yarygin)

    - Provide a better explanation when mmap fails in 'trace' (Arnaldo Carvalho de Melo)

    - Add --buildid-dir option to set cache directory, i.e. use:

    $ perf --buildid-dir /path/to/dir tool --tool-options

    (Jiri Olsa)

    - Fix memcpy/memset 'perf bench' output (Rabin Vicent)

    - Fix 'perf test' attr tests size values to cope with machine state on
    interrupt ABI changes (Jiri Olsa)

    - Fixup callchain type parameter handling error message (Kan Liang)

    Infrastructure changes and cleanups:

    - calloc/xcalloc: Fix argument order (Arjun Sreedharan)

    - Move filename__read_int from tools/perf/ to tools/lib, add sysctl__read_int
    there and use it in place of ad-hoc copies (Arnaldo Carvalho de Melo)

    - Use single strcmp call instead of two (Jiri Olsa)

    - Remove extra debugdir variables in 'perf buildid-cache' (Jiri Olsa)

    - Fix -a segfault related to kcore handling in 'perf buildid-cache' (Jiri Olsa)

    - Move cpumode resolve code to add_callchain_ip (Kan Liang)

    - Merge memset into memcpy 'perf bench' (Rabin Vincent)

    - Change print format from %lu to %PRIu64 in the hists browser (Tom Huynh)

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Will come in handy for tools, see next patches.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-nay9j62ztxpytt4ew1tkl4op@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Will be useful for new helpers to read sysctl values.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: David Ahern
    Cc: Don Zickus
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Mike Galbraith
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

25 Nov, 2014

2 commits

  • SPC-3 defines SERVICE ACTION IN(12), SERVICE_ACTION OUT(12),
    SERVICE ACTION OUT(16), and SERVICE ACTION BIDIRECTIONAL.
    And READ MEDIA SERIAL NUMBER has long since been deprecated.
    So update callers to refer to the new cdb name.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16).
    So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be
    consistent with SPC and to allow for better distinction.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     

26 Sep, 2014

2 commits

  • We will use this in perf's evlist class so that it can, at
    fdarray__filter() time, to unmap the associated ring buffer.

    We may need to have further info associated with each fdarray entry, in
    that case we'll make that int array a 'union fdarray_priv' one and put a
    pointer there so that users can stash whatever they want there. For now,
    an int is enough tho.

    v2: Add clarification to the per array entry priv area, as well as make
    it a union, which makes usage a bit longer, but if/when we make it
    use more space by allowing per entry pointers existing users source
    code will not have to be changed, just rebuilt.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Signed-off-by: Arnaldo Carvalho de Melo

    Link: http://lkml.kernel.org/n/tip-0p00bn83quck3fio3kcs9vca@git.kernel.org

    Arnaldo Carvalho de Melo
     
  • The extensible file description array that grew in the perf_evlist class
    can be useful for other tools, as it is not something that only evlists
    need, so move it to tools/lib/api/fd to ease sharing it.

    v2: Don't use {} like in:

    libapi_dirs:
    $(QUIET_MKDIR)mkdir -p $(OUTPUT){fs,fd}/

    in Makefiles, as it will not work in some systems, as in ubuntu13.10.

    v3: Add fd/*.[ch] to LIBAPIKFS_SOURCES (Fix from Jiri Olsa)

    v4: Leave the fcntl(fd, O_NONBLOCK) in the evlist layer, remains to
    be checked if it is really needed there, but has no place in the
    fdarray class (Fix from Jiri Olsa)

    v5: Remove evlist details from fdarray grow/filter tests. Improve it a
    bit doing more tests about expected internal state.

    Cc: Adrian Hunter
    Cc: Borislav Petkov
    Cc: Corey Ashford
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jean Pihet
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-kleuni3hckbc3s0lu6yb9x40@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

28 Jul, 2014

1 commit


16 Jul, 2014

1 commit


08 Jul, 2014

3 commits


27 Jun, 2014

1 commit


20 Jun, 2014

7 commits

  • While synchronizing what's in trace-cmd vs what's in perf, I came
    across a change that was made when entering the jbd2 plugin into
    the tools/lib/traceevent directory. For example, one of the function
    prototypes went from:

    unsigned long long process_jbd2_dev_to_name(struct trace_seq *s,
    unsigned long long *args)

    to:

    static unsigned long long
    process_jbd2_dev_to_name(struct trace_seq *s,
    unsigned long long *args)

    I can understand the line break after the long long, but there's no
    reason to keep args on a separate line.

    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140612204144.018410d4@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     
  • While synchronizing what's in trace-cmd vs what's in perf, I came
    across a change that was made when entering the cfg80211 plugin into
    the tools/lib/traceevent directory. The function prototype went from:

    static unsigned long long process___le16_to_cpup(struct trace_seq *s,
    unsigned long long *args)

    to:

    static unsigned long long
    process___le16_to_cpup(struct trace_seq *s,
    unsigned long long *args)

    I can understand the line break after the long long, but there's no
    reason to keep args on a separate line.

    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140612194420.24073744@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     
  • The format field argument passed to the format
    in pevent_print_num_field() will be of type long long. That means that
    %ll must be used instead of %l.

    Acked-by: Namhyung Kim
    Reported-by: Namhyung Kim
    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140613103127.1a9bdee7@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     
  • Fix several issues of kvm_nested_vmexit[_inject]: field width aren't
    supported with pevent_print, rip was printed twice/incorrectly, SVM ISA
    was hard-coded, we don't use ':' to separate field names.

    Link: http://lkml.kernel.org/r/8e6c02b22ea8136c139a91c69d6cc73b8c5c184b.1388855989.git.jan.kiszka@web.de

    Acked-by: Namhyung Kim
    Signed-off-by: Jan Kiszka
    Signed-off-by: Steven Rostedt
    Signed-off-by: Jiri Olsa

    Jan Kiszka
     
  • The nested vmexit events were removed from the backport from trace-cmd because
    they were considered buggy. They have since been updated in trace-cmd but
    are still missing from the traceevent library. Add back in the buggy
    version to be able to backport the fixes.

    Acked-by: Namhyung Kim
    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140613021157.291421941@goodmis.org
    Signed-off-by: Jiri Olsa

    Steven Rostedt (Red Hat)
     
  • We will reuse it for nested vmexit tracepoints.

    Link: http://lkml.kernel.org/r/619c418c8af87f03027b8c8013b0443996605700.1388855989.git.jan.kiszka@web.de

    Acked-by: Namhyung Kim
    Signed-off-by: Jan Kiszka
    Signed-off-by: Steven Rostedt
    Signed-off-by: Jiri Olsa

    Jan Kiszka
     
  • Allows to parse the result even if the KVM plugin does not yet
    understand a specific exit code.

    Link: http://lkml.kernel.org/r/5207446F.1090703@web.de

    Acked-by: Namhyung Kim
    Signed-off-by: Jan Kiszka
    Signed-off-by: Steven Rostedt
    Signed-off-by: Jiri Olsa

    Jan Kiszka
     

08 Jun, 2014

4 commits

  • Coming in v3.16, trace events will be able to save bitmasks in raw
    format in the ring buffer and output it with the __get_bitmask() macro.

    In order for userspace tools to parse this, it must be able to handle
    the __get_bitmask() call and be able to convert the data that's in
    the ring buffer into a nice bitmask format. The output is similar to
    what the kernel uses to print bitmasks, with a comma separator every
    4 bytes (8 characters).

    This allows for cpumasks to also be saved efficiently.

    The first user is the thermal:thermal_power_limit event which has the
    following output:

    thermal_power_limit: cpus=0000000f freq=1900000 cdev_state=0 power=5252

    Link: http://lkml.kernel.org/r/20140506132238.22e136d1@gandalf.local.home

    Suggested-by: Javi Merino
    Signed-off-by: Steven Rostedt
    Acked-by: Namhyung Kim
    Tested-by: Javi Merino
    Link: http://lkml.kernel.org/r/20140603032224.229186537@goodmis.org
    Signed-off-by: Jiri Olsa

    Steven Rostedt (Red Hat)
     
  • Add the options "parent" and "indent" to the function plugin.

    When parent is set, the output looks like this:

    function: fsnotify_modify
    Acked-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/20140603032224.056940410@goodmis.org
    Signed-off-by: Jiri Olsa

    Steven Rostedt (Red Hat)
     
  • The traceevent plugins allows developers to have their events print out
    information that is more advanced than what can be achieved by the
    trace event format files.

    As these plugins are used on the userspace side of the tracing tools, it
    is only logical that the tools should be able to produce different types
    of output for the events. The types of events still need to be defined by
    the plugins thus we need a way to pass information from the tool to the
    plugin to specify what type of information to be shown.

    Not only does the information need to be passed by the tool to plugin, but
    the plugin also requires a way to notify the tool of what options it can
    provide.

    This builds the plugin option infrastructure that is taken from trace-cmd
    that is used to allow plugins to produce different output based on the
    options specified by the tool.

    Signed-off-by: Steven Rostedt
    Acked-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/20140603184154.0a4c031c@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     
  • Add a flag to pevent that will let the callers be able to set it and
    keep the system, and perhaps even normal plugins from being loaded.

    This is useful when plugins might hide certain information and seeing
    the raw events shows what may be going on.

    Signed-off-by: Steven Rostedt
    Acked-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/20140603032223.678098063@goodmis.org
    Signed-off-by: Jiri Olsa

    Steven Rostedt (Red Hat)
     

06 Jun, 2014

1 commit


04 Jun, 2014

1 commit


11 May, 2014

1 commit


09 May, 2014

2 commits


02 May, 2014

2 commits

  • Combine all definitions into a common tools/include/linux/types.h and
    kill the wild growth elsewhere. Move DECLARE_BITMAP to its proper
    bitmap.h header.

    Signed-off-by: Borislav Petkov
    Acked-by: Rusty Russell
    Link: http://lkml.kernel.org/n/tip-azczs7qcv6h9xek9od10hiv2@git.kernel.org
    Signed-off-by: Jiri Olsa

    Borislav Petkov
     
  • So tools/ has been growing three, at a different stage of their
    development export.h headers and so we should unite into one. Add
    tools/include/ to the include path of virtio and liblockdep to pick the
    shared header now.

    Signed-off-by: Borislav Petkov
    Acked-by: Rusty Russell
    Cc: Arnaldo Carvalho de Melo
    Cc: Ingo Molnar
    Cc: Michael S. Tsirkin
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Sasha Levin
    Cc: virtio-dev@lists.oasis-open.org
    Cc: virtualization@lists.linux-foundation.org
    Link: http://lkml.kernel.org/r/1397493185-19521-2-git-send-email-bp@alien8.de
    Signed-off-by: Jiri Olsa

    Borislav Petkov
     

30 Apr, 2014

1 commit

  • The array debugfs_known_mountpoints[] will cause extra '/'
    character output.
    Remove it.

    pre:
    $ perf probe -l
    /sys/kernel/debug//tracing/uprobe_events file does not exist -
    please rebuild kernel with CONFIG_UPROBE_EVENTS.

    post:
    $ perf probe -l
    /sys/kernel/debug/tracing/uprobe_events file does not exist -
    please rebuild kernel with CONFIG_UPROBE_EVENTS.

    Signed-off-by: Xia Kaixu
    Acked-by: Namhyung Kim
    Link: http://lkml.kernel.org/r/535B6660.2060001@huawei.com
    Signed-off-by: Jiri Olsa

    Xia Kaixu
     

23 Apr, 2014

2 commits

  • Commit 12e55569a244 "tools lib traceevent: Use helper trace-seq in print
    functions like kernel does" added a extra trace_seq helper to process
    string arguments like the kernel does it. But the difference between the
    kernel and the userspace library is that the kernel's trace_seq structure
    has a static allocated buffer. The userspace one has a dynamically
    allocated one. It requires a trace_seq_destroy(), otherwise it produces
    a nasty memory leak.

    Cc: stable@vger.kernel.org # 3.14+
    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140422192330.6bb09bf8@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     
  • The return value for pevent_filter_match() is suppose to return FILTER_NONE
    if the event doesn't have a filter, and FILTER_NOEXIST if there is no filter
    at all. But the change 41e12e580a7 "tools lib traceevent: Refactor
    pevent_filter_match() to get rid of die()" replaced the return value
    with PEVENT_ERRNO__* values and added "backward compatibility" macros
    that used the old names. Unfortunately, the NOEXIST and NONE macros were
    swapped, and this broke users that use the old return names.

    Signed-off-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/20140421222346.0351ced4@gandalf.local.home
    Signed-off-by: Jiri Olsa

    Steven Rostedt
     

17 Apr, 2014

1 commit

  • Pull perf fixes from Ingo Molnar:
    "Tooling fixes, plus a simple hardware-enablement patch for the Intel
    RAPL PMU (energy use measurement) on Haswell CPUs, which I hope is
    still fine at this stage"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tools: Instead of redirecting flex output, use -o
    perf tools: Fix double free in perf test 21 (code-reading.c)
    perf stat: Initialize statistics correctly
    perf bench: Set more defaults in the 'numa' suite
    perf bench: Fix segfault at the end of an 'all' execution
    perf bench: Update manpage to mention numa and futex
    perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
    perf probe: Fix to handle errors in line_range searching
    perf probe: Fix --line option behavior
    perf tools: Pick up libdw without explicit LIBDW_DIR
    MAINTAINERS: Change e-mail to kernel.org one
    perf callchains: Disable unwind libraries when libelf isn't found
    tools lib traceevent: Do not call warning() directly
    tools lib traceevent: Print event name when show warning if possible
    perf top: Fix documentation of invalid -s option
    perf/x86: Enable DRAM RAPL support on Intel Haswell

    Linus Torvalds
     

14 Apr, 2014

2 commits

  • The patch 3a3ffa2e82205 ("tools lib traceevent: Report better error
    message on bad function args") added the error message but it seems
    there's no reason to call warning() directly.

    So change it to do_warning_event() to provide event information too.

    Signed-off-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1395192174-26273-2-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     
  • It's sometimes useful to know where the parse failure was occurred. Add
    do_warning_event() macro to see the failing event.

    It now shows the messages like below:

    $ perf test 5
    5: parse events tests : Warning: [kvmmmu:kvm_mmu_get_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_sync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_unsync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_prepare_zap_page] bad op token {
    Warning: [kvmmmu:fast_page_fault] function is_writable_pte not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_commit] function sizeof not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_start] function sizeof not defined
    Warning: [xen:xen_mmu_set_pgd] function sizeof not defined
    Warning: [xen:xen_mmu_set_pud] function sizeof not defined
    Warning: [xen:xen_mmu_set_pmd] function sizeof not defined
    ...

    Signed-off-by: Namhyung Kim
    Acked-by: Steven Rostedt
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Ramkumar Ramachandra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1395192174-26273-1-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Jiri Olsa

    Namhyung Kim
     

01 Apr, 2014

2 commits