21 May, 2010
4 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c -
The FunctionFS gadget may provide the source/sink interface
not as the first interface (with id == 0) but some different
interface hence a code to find the interface number is
required.(Note that you will still configure the gadget to report
idProduct == 0xa4a4 (an "echo 0xa4a4
>/sys/module/g_ffs/parameters/usb_product" should suffice) or
configure host to handle 0x0525:0xa4ac devices using the
usbtest driver.)Signed-off-by: Michal Nazarewicz
Cc: Kyungmin Park
Cc: Marek Szyprowski
Signed-off-by: Greg Kroah-Hartman -
The testusb program just issues ioctls to perform the tests
implemented by the kernel driver. It can generate a variety
of transfer patterns; you should make sure to test both regular
streaming and mixes of transfer sizes (including short transfers).For more information on how this can be used and on USB testing
refer to .Signed-off-by: Michal Nazarewicz
Cc: Kyungmin Park
Cc: Marek Szyprowski
Signed-off-by: Greg Kroah-Hartman -
This adds an example user-space FunctionFS driver which
implements a source/sink interface used for testing.Signed-off-by: Michal Nazarewicz
Cc: Kyungmin Park
Cc: Marek Szyprowski
Signed-off-by: Greg Kroah-Hartman
18 May, 2010
8 commits
-
…git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits)
perf tools: Add mode to build without newt support
perf symbols: symbol inconsistency message should be done only at verbose=1
perf tui: Add explicit -lslang option
perf options: Type check all the remaining OPT_ variants
perf options: Type check OPT_BOOLEAN and fix the offenders
perf options: Check v type in OPT_U?INTEGER
perf options: Introduce OPT_UINTEGER
perf tui: Add workaround for slang < 2.1.4
perf record: Fix bug mismatch with -c option definition
perf options: Introduce OPT_U64
perf tui: Add help window to show key associations
perf tui: Make <- exit menus too
perf newt: Add single key shortcuts for zoom into DSO and threads
perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed
perf newt: Fix the 'A'/'a' shortcut for annotate
perf newt: Make <- exit the ui_browser
x86, perf: P4 PMU - fix counters management logic
perf newt: Make <- zoom out filters
perf report: Report number of events, not samples
perf hist: Clarify events_stats fields usage
...Fix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c
-
make NO_NEWT=1
Will avoid building the newt (tui) support.
Suggested-by: Ingo Molnar
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
That happened for an old perf.data file that had no fake MMAP events for
the kernel modules, but even then it should warn once for each module,
not one time for every symbol in every module not found.Reported-by: Ingo Molnar
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
At least on rawhide using -lnewt is not enough if we use SLang routines
directly, so add an explicit -lslang since we use SLang routines.Reported-by: Ingo Molnar
Tested-by: Ingo Molnar
Signed-off-by: Arnaldo Carvalho de Melo -
OPT_SET_INT was renamed to OPT_SET_UINT since the only use in these
tools is to set something that has an enum type, that is builtin
compatible with unsigned int.Several string constifications were done to make OPT_STRING require a
const char * type.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
To avoid problems like the one fixed by Stephane Eranian in 3de29ca, now
we'll got this instead:bench/sched-messaging.c:259: error: negative width in bit-field ‘’
bench/sched-messaging.c:261: error: negative width in bit-field ‘’Which is rather cryptic, but is how BUILD_BUG_ON_ZERO works, so kernel
hackers should be already used to this.With it in place found some problems, fixed by changing the affected
variables to sensible types or changed some OPT_INTEGER to OPT_UINTEGER.Next csets will go thru converting each of the remaining OPT_ so that
review can be made easier by grouping changes per type per patch.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
For unsigned int options to be parsed, next patches will make use of it.
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
17 May, 2010
5 commits
-
Older versions of the slang library didn't used the 'const' specifier,
causing problems with modern compilers of this kind:util/newt.c:252: error: passing argument 1 of ‘SLsmg_printf’ discards
qualifiers from pointer target typeFix it by using some wrappers that when needed const the affected
parameters back to plain (char *).Reported-by: Lin Ming
Cc: Frédéric Weisbecker
Cc: Lin Ming
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
The -c option defines the user requested sampling period. It was implemented
using an unsigned int variable but the type of the option was OPT_LONG. Thus,
the option parser was overwriting memory belonging to other variables, namely
the mmap_pages leading to a zero page sampling buffer. The bug was exposed only
when compiling at -O0, probably because the compiler was padding variables at
higher optimization levels.This patch fixes this problem by declaring user_interval as u64. This also
avoids wrap-around issues for large period on 32-bit systems.Commiter note:
Made it use OPT_U64(user_interval) after implementing OPT_U64 in the
previous patch.Cc: David S. Miller
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Stephane Eranian
Signed-off-by: Arnaldo Carvalho de Melo -
We have things like user_interval (-c/--count) in 'perf record' that
needs this.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
In fact it is now added to the hot key list when newt_form__new is used,
allowing us to remove the explicit assignment in all its users.The visible change is that is
pressed (and Enter when callchains are not being used).Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
16 May, 2010
4 commits
-
'D'/'d' for zooming into the DSO in the current highlighted hist entry,
'T'/'t' for zooming into the current thread.Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
ESC still asks for confirmation.
Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Reported-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Right now that means that pressing the left arrow willl make the symbol
annotation window to exit back to the main symbol histogram browser.This is another improvement on the UI fastpath, i.e. just the arrows and
enter are enough for most browsing.Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
15 May, 2010
3 commits
-
After we use the filters to zoom into DSOs or threads, we can use
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Number of samples is meaningless after we switched to auto-freq, so
report the number of events, i.e. not the sum of the different periods,
but the number PERF_RECORD_SAMPLE emitted by the kernel.While doing this I noticed that naming "count" to the sum of all the
event periods can be confusing, so rename it to .period, just like in
struct sample.data, so that we become more consistent.This helps with the next step, that was to record in struct hist_entry
the number of sample events for each instance, we need that because we
use it to generate the number of events when applying filters to the
tree of hist entries like it is being done in the TUI report browser.Suggested-by: Ingo Molnar
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
The events_stats.total field is too generic, rename it to .total_period,
and also add a comment explaining that it is the sum of all the .period
fields in samples, that is needed because we use auto-freq to avoid
sampling artifacts.Ditto for events_stats.lost, that is the sum of all lost_event.lost
fields, i.e. the number of events the kernel dropped.Looking at the users, builtin-sched.c can make use of these fields and
stop doing it again.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
14 May, 2010
5 commits
-
This is one more thing that started global but are more useful per hist
or per session.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
option option -> option
special special -> specialSigned-off-by: Kirill Smelkov
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
By default, event inheritance across fork and pthread_create was on but the -i
option of stat and record, which enabled inheritance, led to believe it was off
by default.This patch fixes this logic by inverting the meaning of the -i option. By
default inheritance is on whether you attach to a process (-p), a thread (-t)
or start a process. If you pass -i, then you turn off inheritance. Turning off
inheritance if you don't need it, helps limit perf resource usage as well.The patch also fixes perf stat -t xxxx and perf record -t xxxx which did not
start the counters.Acked-by: Frederic Weisbecker
Cc: David S. Miller
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
Cc: Paul Mackerras
Cc: Peter Zijlstra
LKML-Reference:
Signed-off-by: Stephane Eranian
Signed-off-by: Arnaldo Carvalho de Melo -
hist.c needs to include util.h so that it gets stdio.h
inclusion with __GNU_SOURCE defined.Fixes:
util/hist.c: In function ‘hist_entry__parse_objdump_line’:
util/hist.c:931: erreur: implicit declaration of function ‘getline’
util/hist.c:931: erreur: nested extern declaration of ‘getline’Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
Cc: Paul Mackerras
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Fix mistake in a parameter type of the no-newt hists__browse()
version.Fixes:
builtin-report.c: In function ‘__cmd_report’:
builtin-report.c:314: erreur: incompatible type for argument 1 of ‘hists__browse’Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
Cc: Paul Mackerras
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
13 May, 2010
1 commit
-
Usually "_text" is enough, but I received reports that its not always
available, so fallback to "_stext" for the symbol we use to check if we
need to apply any relocation to all the symbols in the kernel symtab,
for when, for instance, kexec is being used.Reported-by: Darren Hart
Reported-by: Steven Rostedt
Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Peter Zijlstra
Cc: Paul Mackerras
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: Ingo Molnar
12 May, 2010
2 commits
-
Now we don't anymore use popen to run 'perf annotate' for the selected
symbol, instead we collect per address samplings when processing samples
in 'perf report' if we're using the newt browser, then we use this data
directly to do annotation.Done this way we can actually traverse the objdump_line objects
directly, matching the addresses to the collected samples and colouring
them appropriately using lower level slang routines.The new ui_browser class will be reused for the main, callchain aware,
histogram browser, when it will be made generic and don't assume that
the objects are always instances of the objdump_line class maintained
using list_heads.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Initially this was just to be able to have a printf like method to
prepare the formatted string and then pass to newtPushHelpLine, but as
we already have for ui_progress, etc, its a step in identifying a
restricted, highlevel set of widgets we can then have implementations
for multiple widget sets (GTK, etc).Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo
11 May, 2010
8 commits
-
For Fedora, I want to force perf to link against libiberty.a for
cplus_demangle, rather than libbfd.a for bfd_demangle due to licensing insanity
on binutils. (libiberty is LGPL2, libbfd is GPL3.)If we just rely on autodetection, we'll end up with libbfd linked against us,
since they're both in binutils-static in the buildroot.Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Kyle McMartin
Signed-off-by: Arnaldo Carvalho de Melo -
Check whether elfutils is older than 0.138 (from which version checking
routine has been introduced). And if so, set NO_DWARF because it is hard
to check the API dependency without version checking.Signed-off-by: Masami Hiramatsu
Reported-by: Robert Richter
Cc: Robert Richter
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
Those are really not specific to the newt code, can be used by other UI
frontends.Cc: Frédéric Weisbecker
Cc: Mike Galbraith
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Tom Zanussi
LKML-Reference:
Signed-off-by: Arnaldo Carvalho de Melo -
The raw_field_ptr() helper, used to retrieve the address of a field
inside a trace event, treats every strings as if they were dynamic
ie: having a secondary level of indirection to retrieve their
contents.FIELD_IS_STRING doesn't mean FIELD_IS_DYNAMIC, we only need to
compute the secondary dereference for the latter case.This fixes perf sched segfaults, bad cmdline report and may be
some other bugs.Reported-by: Jason Baron
Reported-by: Arnaldo Carvalho de Melo
Signed-off-by: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Peter Zijlstra
Cc: Paul Mackerras
Cc: Tom Zanussi -
A small fix for the syscall counts script:
- silence the match output in the shell script
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Tom Zanussi
Signed-off-by: Arnaldo Carvalho de Melo -
A small fix for the syscall counts by pid script:
- silence the match output in the shell script
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Tom Zanussi
Signed-off-by: Arnaldo Carvalho de Melo -
A small fixe for the failed syscalls by pid script:
- silence the match output in the shell script
Cc: Frédéric Weisbecker
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Tom Zanussi
Signed-off-by: Arnaldo Carvalho de Melo -
Only print the script start/stop messages in verbose mode - users
normally don't care and it just clutters up the output.Cc: Frédéric Weisbecker
Cc: Ingo Molnar
LKML-Reference:
Signed-off-by: Tom Zanussi
Signed-off-by: Arnaldo Carvalho de Melo