Fix compile errors on Ubuntu 14.04

The gcc 4.8.2 on Ubuntu 14.04 complains about two different
types of issues that we've not seen older compilers complain about.
The complaints are warnings that are turned into errors, due to
our use of -Werror.  The first type of error involves fprintf:

   error: format not a string literal and no format arguments

I've found the following explanation for this change in gcc behavior:

  If -Wformat is specified, also warn about uses of format
  functions that represent possible security problems.  At present,
  this warns about calls to "printf" and "scanf" functions where
  the format string is not a string literal and there are no format
  arguments, as in "printf (foo);".  This may be a security hole if
  the format string came from untrusted input and contains %n.
  (This is currently a subset of what -Wformat-nonliteral warns
  about, but in future warnings may be added to -Wformat-security
  that are not included in -Wformat-nonliteral.)

The second type of error is for not checking the return value of fgets.

This patch fixes these two issues and resolved the compilation problems.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Remove opreport warnings for /no-vmlinux, [vdso], [hypervisor_bucket] not found

When running opreport -l, the following warning messages may appear:

warning: /no-vmlinux could not be found.
warning: [vdso] (tgid:31882 range:0x7fff249ae000-0x7fff249aefff) could not be found.
warning: [hypervisor_bucket] (tgid:24654 range:0x994-0x17a09c0) could not be found

For the '/no-vmlinux' case, it's not a real file -- it's just a bucket
we use to assign kernel samples to.  For the '[vdso]' case, this reflects
samples in the vDSO (virtual dynamic shared object), which is a small shared
library that the kernel automatically maps into the address space of all
user-space applications.  The '[hypervisor_bucket]' message can happen
on virtualized systems with a hypervisor (e.g., PowerVM) because there is
no physical binary file to attribute hypervisor samples to.

The warnings are annoying and unnecessary, so they are removed via this
patch. This patch also adds a description of "no-vmlinux" to the operf man
page.  And for '[vdso]', users can easily google for a description.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Make op_bfd::get_kallsym_symbols() 32/64-bit agnostic

The size of %lx is 32 bits on 32-bit machine and 64-bits on 64-bit
machines.  However, bfd_vma is always a 64-bit value regardless
whether the processor is a 32-bit or 64-bit architecture.  The
get_kallsym_symbols() used the %lx which only matched up on the 64-bit
machines.  This changes the code to always read things into a
"unsigned long long" variable and then copy that value into the
bfd_vma variable to allow the code to compile on both 32-bit and
64-bit machine
Add more pseudo events for POWER7 to count rising edge events

This patch is specific to the IBM Power architecture. This patch
adds two new POWER7 events which uses the edge detection:
   PM_GCT_NOSLOT_BR_MPRED_EDGE_COUNT
   PM_CMPLU_STALL_THRD_EDGE_COUNT

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Allow root to remove old jitdump files from /tmp/.oprofile/jitdump

Currently, the opjitconv program reqiress that the owner of an old
jitdump file and the user running operf must be the same in order
to allow deletion of said jitdump file. The root user should be
allowed to do this, too, which is what this patch does.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Add 4 more edge detect events for use in CPI analysis

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>