oprofile Log


Commit Date  
[be6d22] by Maynard Johnson Maynard Johnson

Fix issues detected by Coverity

Will Cohen ran Coverity against oprofile and reported some issues
on Nov 20, 2013. I submitted the current oprofile source to the
Coverity webpage, and a couple new issues were detected. This
patch addresses most of these issues. Some issues are either
false positives from Coverity's analysis or have been marked
as "Intentional" so as to have Coverity ignore them.

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

2014-01-27 21:44:18 Tree
[6ee980] by Maynard Johnson Maynard Johnson

Fix Coverity errors found on May 20, 2013 git snapshot

Coverity identified the following errors on scans run from May 7 through
May 20, 2013:

Type,Category,File,Function
Wrapper object use after free,Memory - illegal accesses,/agents/jvmpi/jvmpi_oprofile.cpp,compiled_method_load(JVMPI_Event *)
Unchecked return value,Error handling issues,/daemon/opd_mangling.c,opd_open_sample_file
Dereference after null check,Null pointer dereferences,/daemon/opd_sfile.c,sfile_hash
Uninitialized scalar field,Uninitialized members,/gui/oprof_start_config.cpp,config_setting::config_setting()
Division or modulo by zero,Integer handling issues,/libdb/db_stat.c,odb_hash_stat
Resource leak,Resource leaks,/libop/op_cpu_type.c,_auxv_fetch
Resource leak,Resource leaks,/libop/op_cpu_type.c,fetch_at_hw_platform
Negative array index read,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Write to pointer after free,Memory - corruptions,/libop/op_events.c,read_events
Read from pointer after free,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Time of check time of use,Security best practices violations,/libopagent/opagent.c,op_open_agent
Improper use of negative value,Integer handling issues,/libperf_events/operf_counter.cpp,operf_record::setup()
Double free,Memory - corruptions,/libperf_events/operf_counter.cpp,operf_record::setup()
Uninitialized pointer read,Memory - illegal accesses,/libperf_events/operf_counter.cpp,<unnamed>::_get_perf_event_from_file(mmap_info &)
Unchecked return value,Error handling issues,/libperf_events/operf_mangling.cpp,"operf_open_sample_file(odb_t *, operf_sfile *, operf_sfile *, int, int)"
Using invalid iterator,API usage errors,/libperf_events/operf_process_info.cpp,operf_process_info::try_disassociate_from_parent(char *)
Non-array delete for scalars,Memory - illegal accesses,/libregex/op_regex.cpp,"<unnamed>::op_regerror(int, const re_pattern_buffer &)"
Resource leak,Resource leaks,/libutil++/op_bfd.cpp,"op_bfd::op_bfd(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const string_filter &, const extra_images &, bool &)"
Explicit null dereferenced,Null pointer dereferences,/opjitconv/create_bfd.c,fill_symtab
Resource leak,Resource leaks,/opjitconv/opjitconv.c,_cleanup_jitdumps
Use of untrusted string value,Insecure data handling,/opjitconv/opjitconv.c,main
Resource leak,Resource leaks,/pe_profiling/operf.cpp,_get_cpu_for_perf_events_cap()
Dereference null return value,Null pointer dereferences,/pe_profiling/operf.cpp,_process_session_dir()
Incorrect deallocator used,API usage errors,/pe_profiling/operf.cpp,_process_events_list()

===============================

This patch fixes those errors.

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

2013-05-28 13:19:25 Tree
[74abfb] by Maynard Johnson Maynard Johnson

Fix Coverity issues identified against oprofile 0.9.8 release

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

2013-05-15 18:14:43 Tree
[745ede] by Daniel Hansel Daniel Hansel , pushed by Maynard Johnson Maynard Johnson

Change location to store intermediate JIT dump files

Since JIT support was added to Oprofile the intermediate JIT dump files
holding the sampling data collected for a Java process were stored in a
hard coded directory /var/lib/oprofile/jitdump that was world-writable.
The setting of a session specific directory (i.e. "--session-dir=...")
was not used anyway.

Now during profiling JIT dump files are stored under /tmp/.oprofile/jitdump.
When opjitconv has finished the conversion of the JIT dump files (the result
is stored under the default location (e.g. /var/lib/oprofile, ./oprofile_data
or the specified session directory) the intermediate JIT dump file will be
deleted.

Signed-off-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>

2013-01-23 16:24:37 Tree
[fcb818] by Maynard Johnson Maynard Johnson

Remove daemon/liblegacy since 2.4 kernels are no longer supported

A build problem reported by Vineet Gupta (Vineet.Gupta1@synopsys.com)
involving a compile failure of liblegacy code when built under uClibc
made it clear that we missed some things when support for 2.4 kernels
was removed in Oct 2012. The daemon/liblegacy directory is all about
support for 2.4 kernels, so this patch completely removes that directory.
Of course, this caused some breakage elsewhere in the oprofile tree
which needed fixing up.

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

2012-12-05 15:55:18 Tree
[c85362] by Maynard Johnson Maynard Johnson

Change "Nr. event lost ..." field in the oprofiled.log to "Nr. samples lost ..."

The "Nr. event lost due to buffer overflow" field in the oprofiled.log is
mis-named. It should be "Nr. samples lost due to buffer overflow" in spite
of the fact that the filename in oprofilefs is called 'event_lost_overflow'.

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

2012-07-20 15:19:17 Tree
[91919f] by Maynard Johnson Maynard Johnson

[PATCH] Fix how "Nr. non-backtrace samples" from oprofiled.log is calculated

The "Nr. non-backtrace samples" is tracked in the daemon code with
opd_stats[OPD_SAMPLES]. This value is incremented every time sfile_find()
is called from opd_put_sample(). However, if we're processing samples for
which the sfile was previously found and the trans->current value is valid,
we will not call sfile_find() and, thus, the opd_stats[OPD_SAMPLES] stat
will not be incremented.

This problem is most easily seen by starting oprofile on a fairly quiesced
system, then run several instances of the same test program (ideally, at
least as many instances as you have processors). For example, on a laptop
with two processors, I ran 4 copies of a testcase and below is what the
oprofiled.log statistics looked like with this bug:

-----------------------------
-- OProfile Statistics --
Nr. sample dumps: 48
Nr. non-backtrace samples: 329952
Nr. kernel samples: 79505
Nr. lost samples (no kernel/user): 0
. . .
---- Statistics for cpu : 1
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 944623
Nr. backtrace aborted: 0
Nr. samples lost invalid pc: 0

---- Statistics for cpu : 0
Nr. samples lost cpu buffer overflow: 0
Nr. samples received: 925436
Nr. backtrace aborted: 0
Nr. samples lost invalid pc: 0
oprofiled stopped Thu Jul 19 08:51:47 2012
---------------------------------

As can be seen above, the individual CPU stats show 925436
samples collected, where as the Nr. non-backtrace samples
is 329952. With the fix in this path, the total of the CPU
stats and the Nr. non-backtrace samples are roughly equal.

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

2012-07-20 15:17:06 Tree
[8f12d5] by Maynard Johnson Maynard Johnson

Fix configure to not alter user variables and remove non-working --with-gcc option

The configure script for oprofile had a few places
where user variables were being altered in contradiction
to the GNU Automake manual. See the following URL for details:

http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html

In brief, user variables are those listed under "Some influential
environment variables" section of the output from 'configure --help'.
These are variables which the user may set prior to invoking configure,
and thus, the configure script should not alter them. This patch
makes use of new internal variables (e.g., OP_LDFLAGS and OP_CPPFLAGS),
which did unfortunately create quite a ripple effect with the Makefile.am
files. But this was unavoidable in order to correct this error.

Additionally, the '--with-gcc' option does not work anymore because
the generated configure script runs the AC_PROG_CC before processing the
"--with-gcc" option, so it fails to find a compiler. Unsure of when
this stopped working (assume it must have worked in 2005 when it was
initially added), but even fairly old distros (e.g., SLES 10) with
autoconf version 2.59 do not process this option as we would want.
If users wish to configure oprofile to use an alternate compiler,
they should pass the compiler pathnames on the configure command line, thusly:
./configure CC=/my-gcc-install/bin/gcc CXX=/my-gcc-instal/g++

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

2012-07-13 17:44:49 Tree
[abdfd8] by Maynard Johnson Maynard Johnson

Add same fix to master branch as already made to perf-events to not discard samples from process 0

2012-05-15 19:56:40 Tree
[bea079] by Maynard Johnson Maynard Johnson

Fix patch committed on Feb 29, 2012 so that samples from PID 0 are not discarded.

2012-05-14 16:20:52 Tree
[a99538] by Maynard Johnson Maynard Johnson

Discard user context kernel samples for which we have no app_cookie

Symptom: Under certain conditions, samples are not attributed to the appropriate
app name. If profiling is done with --separate=lib,kernel,thread and then a
report is generated using a tgid or tid specification to see profile data for one
particular process or thread, you may see anomalies like that shown below. Note
the line with "ext3" under the 'app name' column, when all other lines (rightly)
have "spin".

samples % image name app name symbol name
1018088 99.8455 spin spin .spin
1566 0.1536 ext3 spin /ext3
4 3.9e-04 ext3 ext3 /ext3
1 9.8e-05 ld-2.12.1.so spin ._dl_map_object_from_fd
1 9.8e-05 ld-2.12.1.so spin ._dl_relocate_object
1 9.8e-05 ld-2.12.1.so spin .check_match.8837
1 9.8e-05 libc-2.12.1.so spin ._IO_cleanup

See the big comment in daemon/opd_sfile.c for details of the problem and how
this patch fixes it.

2012-02-29 18:13:20 Tree
[d29bec] by Andreas Krebbel Andreas Krebbel , pushed by Maynard Johnson Maynard Johnson

Fix up s390 implementation to match what was accepted upstream in the kernel

2011-12-13 22:06:16 Tree
[005f26] by Joakim Tjernlund Joakim Tjernlund , pushed by Maynard Johnson Maynard Johnson

Print correct clock speed when using timer mode

2011-11-28 23:55:14 Tree
[2a0cb3] by Maynard Johnson Maynard Johnson

Fix oprofile build warnings when using gcc 4.6.1 or newer

2011-10-24 14:36:57 Tree
[bb738f] by Paul Guo Paul Guo , pushed by Maynard Johnson Maynard Johnson

Add support for Tilera tile64/tilepro/tile-gx processor family

2011-10-19 16:02:42 Tree
[c673c7] by William Cohen William Cohen , pushed by Suravee Suthikulpanit Suravee Suthikulpanit

Fix possible buffer overruns in ibs_init()

2011-07-29 13:20:38 Tree
[5591c3] by William Cohen William Cohen , pushed by Suravee Suthikulpanit Suravee Suthikulpanit

Fix compilation error due to the assembly language instruction cpuid

2011-07-05 02:02:45 Tree
[9529ae] by William Cohen William Cohen

Convert the .cvsignore files into .gitignore files.

2011-02-15 19:50:17 Tree
[24b87e] by Maynard johnson Maynard johnson

Fix non-x86 build issue due to cpuid instruction

2010-12-14 17:40:20 Tree
[132581] by Suravee Suthikulpanit Suravee Suthikulpanit

Add additional IBS supports for AMD processors family12h/14h/15h

2010-11-29 15:05:44 Tree
[f24b68] by Daniel Hansel Daniel Hansel

Fix memory leak according to opening opd_pipe (added missing changes)

2010-04-12 10:01:33 Tree
[d9ff7e] by Daniel Hansel Daniel Hansel

Fix memory leak according to opening opd_pipe

2010-03-17 18:01:08 Tree
[1cb4f1] by Maynard johnson Maynard johnson

Fix start-daemon problem on ia64

2009-10-29 20:59:27 Tree
[4da265] by Maynard johnson Maynard johnson

Handle events that differ only by unit mask - patch 2/2

2009-06-05 15:26:40 Tree
[18fd2b] by Suravee Suthikulpanit Suravee Suthikulpanit

Add patch to fix ext initialization

2009-05-27 19:12:48 Tree
Older >

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks