Wrong common field name in GFX Wakeups event

Here is formatted version of the patch:

 From 23362fa0f7bbfd0497a8ccbb9d06a4520eae8057 Mon Sep 17 00:00:00 2001
From: Igor Zhbanov<i.zhbanov@samsung.com>
Date: Wed, 11 Jul 2012 12:30:27 +0400
Subject: [PATCH] Wrong common field name in GFX Wakeups event

I have found that PowerTOP doesn't displays values in "GFX Wakeups/s" column.
It is because of wrong event field name the handle_trace_point() method
expects to find in a trace event.
Device list sort function bug

So here is the formatted version:

 From 5d284137a6035bab65717fbacd98423b96d862cf Mon Sep 17 00:00:00 2001
From: Igor Zhbanov<i.zhbanov@samsung.com>
Date: Wed, 11 Jul 2012 12:08:21 +0400
Subject: [PATCH] Device list sort function bug

Sometimes PowerTOP dies with a Segmentation Fault while generating
the report. Little investigation shown that it dies while sorting
the device list. The problem is that comparison function devlist_sort
is incorrect.

The function should return true if first argument "preceeds" second.
But when strcmp() is used, it can return -1, 0 and 1. So both -1 and 1
values are silently converted to true, which is wrong. It confuses the sort()
function and it crosses boundary of array.
update patch issue
Display all P-states in HTML-report

This is the formatted version of the patch:

 From 66d0f194250d94afcf83eb7712af6f50c6ad8ec4 Mon Sep 17 00:00:00 2001
From: Igor Zhbanov<i.zhbanov@samsung.com>
Date: Wed, 11 Jul 2012 12:35:31 +0400
Subject: [PATCH] Display all P-states in HTML-report

On Arm processors there are more than 10 P-states. On my device there are 12
p-states with different frequency. But PowerTOP displays only 10. And it
doesn't display states (11 and 12) where the phone spends most of the time.

I suppose that was because of console mode of PowerTOP, when there are limited
number of lines on the console. But in the case of HTML-report this should
not be a problem.

This patch that counts the number of found P-states and displays all of them.

The same issue may affect the function report_display_cpu_cstates()
but I'm not sure that CPUs with more than 10 C-states exists.

The same code is in the function impl_w_display_cpu_states(), but that
function is used in console mode only where lines limit is reasonable.
Fix handling of /proc/cpuinfo for non x86 architectures

Not all architectures include lines with "vendor_id\t" or
"processor\t". ARM Linux without SMP support includes
neither of these two entries. With SMP support, there are
"processor\t" entries for each CPU.

Set vendor to an empty string initially, so there is a default value.

Assume CPU id 0 when no number was set while encountering the first
"bogomips\t" line. If there are more such lines without a correct
number, only the first CPU is handled. This should not be needed
for ARM, but makes the code more robust because it avoids calling
handle_one_cpu twice with number == 0.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
ccstoh: Don't return success if something went wrong

exit(0) is the same as returning EXIT_SUCCESS which is a bad
idea after a severe failure. It will for example result in
wrong behaviour of make (make won't stop after such failures).

Returning EXIT_FAILURE fixes this.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Fix out-of-tree builds

Out-of-tree builds are a very useful feature which should be supported
by all programs which use GNU automake and the configure / make build.

For powertop, only a very small fix was needed to make it work.
Without that fix, powertop.css is not found when a build is not
started from the source tree, so csstoh fails and creates no css.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Remove unneded zlib dependency

Remove unneded zlib dependency from configure.ac
Get rid of ncurses' TRUE and FALSE

Get rid of TRUE and FALSE ncurses' defines used for boolean variables
initialization. This fix also helps build without ncurses support.
conditionally disable pci if not supported

disable pci if not supported by host platform. When
libpci is not found, define a macro which will be
used for conditional compilation.

Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
For systems with pci you will want libpci, but for systems that do not have pci you will not.
libpci has been made an optional lib, but for thoes who have pci, a warning has been added.
this warning is to let people know that PowerTOP was configured with pci support.
conditionally disable pci if not supported

disable pci if not supported by host platform. When
libpci is not found, define a macro which will be
used for conditional compilation.

Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Removed boardname as the project is no longer supported, and the tool dosn't meet all needs as wanted.
removed re-define of __NR_perf_event_open, what was needed for stale headers in older kernels. sys/syscall.h will not be correct.
update readme
add all current transfx files
rebase pevent code to upstream kernel version of tools lib traceevent.
This will allow me to keep update and align with the libary code until it is usable without
building it local.
added README for traceevent
update git tree to remove .deps and .libs from traceevent.
configure: First try to use libnl-3, then libnl-2, then libnl-1

Change search order for libnl in configure.ac:
first try to use libnl-3, then libnl-2, then libnl-1.