Hello community,
here is the log from the commit of package CodeAnalyst for openSUSE:Factory
checked in at Sat Aug 1 12:31:10 CEST 2009.
--------
New Changes file:
--- /dev/null 2009-04-14 11:55:47.000000000 +0200
+++ /mounts/work_src_done/STABLE/CodeAnalyst/CodeAnalyst.changes 2009-07-30 20:27:30.000000000 +0200
@@ -0,0 +1,11 @@
+-------------------------------------------------------------------
+Thu Jul 30 20:24:50 CEST 2009 - jblunck@suse.de
+
+- Rename package.
+
+-------------------------------------------------------------------
+Thu Jul 30 18:04:17 CEST 2009 - tonyj@novell.com
+
+- Fix error in specfile.
+- Create this changes file.
+
calling whatdependson for head-i586
New:
----
CodeAnalyst-gui-2.8.54.tar.bz2
CodeAnalyst.changes
CodeAnalyst.desktop
CodeAnalyst.spec
DiffAnalyst.desktop
ca-da-online-help.patch
ca-fix-basename.patch
ca-fix-oprofile-ibs-check.patch
ca-use-dynamic-feature-check.patch
ca-use-oprofile-default-buffersize.patch
destdir.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ CodeAnalyst.spec ++++++
#
# spec file for package CodeAnalyst (Version 2.8.54)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Summary: CodeAnalyst is a Performance Analysis Suite for AMD-based System
Name: CodeAnalyst
Version: 2.8.54
Release: 1
License: GPL v2 only
Group: Development/Tools/Other
Url: http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux
Source0: http://ftp-developer.amd.com/user/ssuthiku/CALinuxSnapshots/%{name}-gui-%{version}.tar.bz2
Source1: CodeAnalyst.desktop
Source2: DiffAnalyst.desktop
# Use oprofile default cpu/watershed/event-buffer size
# since using stock oprofile daemon/driver
Patch0: ca-use-oprofile-default-buffersize.patch
# Use on-line help
Patch1: ca-da-online-help.patch
# Fix basename issue when building
Patch2: ca-fix-basename.patch
# Fix basename issue when building
Patch3: ca-fix-oprofile-ibs-check.patch
# Use dynamic feature check
Patch4: ca-use-dynamic-feature-check.patch
Requires: binutils
Requires: oprofile >= 0.9.4
PreReq: %insserv_prereq %fillup_prereq pwdutils
BuildRequires: automake
BuildRequires: libtool
BuildRequires: popt-devel
BuildRequires: binutils-devel
BuildRequires: libelf-devel
BuildRequires: qt3-devel >= 3.3
BuildRequires: qt3-designer >= 3.3
BuildRequires: oprofile >= 0.9.4
BuildRequires: libdwarf-devel
BuildRequires: update-desktop-files
BuildRequires: unzip
BuildRequires: pwdutils
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# Unsupported architecture list due to non-AMD based system.
ExcludeArch: ppc ppc64 s390 s390x alpha alphaev6 sparcv9 sparc64
%description
CodeAnalyst is a performance analysis suite. It provids graphical
utilitys for running Oprofile, and analyzing result on AMD-based systems.
CodeAnalyst includes several features to aid profile analysis such as
inline-function analysis, code-block analysis, and a utility for
profile comparison, DiffAnalayst.
%prep
%setup -q -n %{name}-gui-%{version}
%patch0 -p1 -b .ca-use-oprofile-default-buffersize
%patch1 -p1 -b .ca-da-online-help
%patch2 -p1 -b .ca-fix-basename
%patch3 -p0 -b .ca-fix-oprofile-ibs-check
%patch4 -p1 -b .ca-use-dynamic-feature-check
%build
./autogen.sh
%configure \
--with-oprofile=%{_prefix} \
--disable-oprofile-lib \
--disable-static \
--with-libdwarf-includes=%{_includedir}/libdwarf \
--with-libdwarf-libraries=%{_libdir}
make %{?jobs:-j%jobs}
%install
make -C src/ca/libs install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/gui install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/diffgui install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/utils install DESTDIR=${RPM_BUILD_ROOT}
make -C src/ca/scripts install DESTDIR=${RPM_BUILD_ROOT}
# These are help documents and images which
# the GUIs is using for the "Help" on toolbar.
# GUI will not run correctly if these are not available
# make -C doc install DESTDIR=${RPM_BUILD_ROOT}
install -D -m 755 src/ca/scripts/codeanalyst ${RPM_BUILD_ROOT}%{_initrddir}/codeanalyst
ln -sf %{_initrddir}/codeanalyst ${RPM_BUILD_ROOT}%{_sbindir}/rccodeanalyst
install -D -m 755 careport.sh ${RPM_BUILD_ROOT}%{_bindir}
# Remove these unnecessary files from the installation
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/lib*.{la,so}
# install icons
install -D -m 644 src/ca/gui/CodeAnalyst-gui.xpm ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/CodeAnalyst.xpm
install -D -m 644 src/ca/diffgui/DiffAnalyst-gui.xpm ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/DiffAnalyst.xpm
# create hardlinks for duplicate files
%fdupes ${RPM_BUILD_ROOT}%{_datadir}/
# Install CodeAnalyst-gui.desktop file
%suse_update_desktop_file -i CodeAnalyst -u
# Install DiffAnalyst-gui.desktop file
%suse_update_desktop_file -i DiffAnalyst -u
%clean
rm -rf ${RPM_BUILD_ROOT}
%pre
# Adding "amdca" user group
getent group amdca >/dev/null || /usr/sbin/groupadd -r amdca
exit 0
%post
/sbin/ldconfig
%fillup_and_insserv -y codeanalyst
%preun
%stop_on_removal codeanalyst
%postun
%restart_on_update codeanalyst
%insserv_cleanup
/sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc README COPYING INSTALLATION
%{_bindir}/CodeAnalyst
%{_bindir}/DiffAnalyst
%{_bindir}/careport.sh
%{_bindir}/capackage.sh
%{_sbindir}/ca_user_manager
%{_sbindir}/ca_oprofile_controller
%{_sbindir}/rccodeanalyst
%{_libdir}/lib*.so.*
%dir %{_datadir}/codeanalyst
%{_datadir}/codeanalyst/*
%{_datadir}/applications/CodeAnalyst.desktop
%{_datadir}/applications/DiffAnalyst.desktop
%{_datadir}/pixmaps/*
%{_initrddir}/codeanalyst
%changelog
++++++ CodeAnalyst.desktop ++++++
[Desktop Entry]
Name=CodeAnalyst
GenericName=Profiler
Comment=Open .caw files
Exec=CodeAnalyst
Icon=CodeAnalyst
Terminal=false
Type=Application
Categories=Development;Profiling;
++++++ DiffAnalyst.desktop ++++++
[Desktop Entry]
Name=DiffAnalyst
GenericName=Profile Diff Tool
Comment=Open .daw files
Exec=DiffAnalyst
Icon=DiffAnalyst
Terminal=false
Type=Application
Categories=Development;Profiling;
++++++ ca-da-online-help.patch ++++++
diff -paurN CodeAnalyst-gui-2.8.54/Makefile.am CodeAnalyst-gui-2.8.54-online-help//Makefile.am
--- CodeAnalyst-gui-2.8.54/Makefile.am 2009-05-21 11:02:48.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-online-help//Makefile.am 2009-07-27 17:34:43.797273893 -0500
@@ -1,6 +1,5 @@
SUBDIRS = \
- src \
- doc
+ src
dist_bin_SCRIPTS = careport.sh
diff -paurN CodeAnalyst-gui-2.8.54/configure.ac CodeAnalyst-gui-2.8.54-online-help//configure.ac
--- CodeAnalyst-gui-2.8.54/configure.ac 2009-07-06 15:27:20.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-online-help//configure.ac 2009-07-27 17:34:59.360319078 -0500
@@ -533,8 +533,5 @@ AC_OUTPUT(Makefile \
src/ca/libs/libcabba/bbatest/Makefile \
src/ca/libs/liboutput/Makefile \
src/ca/utils/Makefile \
- src/ca/scripts/Makefile \
- doc/Makefile \
- doc/cadoc/Makefile \
- doc/dadoc/Makefile
+ src/ca/scripts/Makefile
)
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/diffgui/DiffAnalystWindow.cpp CodeAnalyst-gui-2.8.54-online-help//src/ca/diffgui/DiffAnalystWindow.cpp
--- CodeAnalyst-gui-2.8.54/src/ca/diffgui/DiffAnalystWindow.cpp 2009-03-23 12:03:41.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-online-help//src/ca/diffgui/DiffAnalystWindow.cpp 2009-07-27 15:38:24.626453501 -0500
@@ -528,7 +528,8 @@ void DiffAnalystWindow::onHelpAbout()
void DiffAnalystWindow::onHelpContents()
{
// TODO: Need to fix the path to point to DiffAnalyst Help Document
- QString invoke = LAUNCH_BROWSER + CA_DATA_DIR "/doc/dadoc/whnjs.htm";
+ //QString invoke = LAUNCH_BROWSER + CA_DATA_DIR "/doc/dadoc/whnjs.htm";
+ QString invoke = LAUNCH_BROWSER + "http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux/Documents/DiffAnal...";
qApp->setOverrideCursor (QCursor (Qt::WaitCursor));
system (invoke.data());
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/gui/application.cpp CodeAnalyst-gui-2.8.54-online-help//src/ca/gui/application.cpp
--- CodeAnalyst-gui-2.8.54/src/ca/gui/application.cpp 2009-06-18 06:54:47.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-online-help//src/ca/gui/application.cpp 2009-07-27 15:37:11.528321176 -0500
@@ -1282,7 +1282,8 @@ void ApplicationWindow::onHelpAbout ()
void ApplicationWindow::onHelpContents ()
{
- QString invoke = LAUNCH_BROWSER + CA_DATA_DIR "/doc/cadoc/whnjs.htm";
+ //QString invoke = LAUNCH_BROWSER + CA_DATA_DIR "/doc/cadoc/whnjs.htm";
+ QString invoke = LAUNCH_BROWSER + "http://developer.amd.com/cpu/CodeAnalyst/codeanalystlinux/Documents/CodeAnal...";
qApp->setOverrideCursor (QCursor (Qt::WaitCursor));
system (invoke.data());
++++++ ca-fix-basename.patch ++++++
--- CodeAnalyst-gui-2.8.54/configure.ac 2009-07-06 15:27:20.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-fix-basename/configure.ac 2009-07-17 16:43:50.905147989 -0500
@@ -35,6 +35,9 @@ AC_PREREQ(2.13)
#Initialize Libtool
AM_PROG_LIBTOOL
+# Fix issue with basename in gcc-4.4
+AC_CHECK_DECLS([basename], [], [], [[#include ]])
+
AM_INIT_AUTOMAKE
#Default installation directory
++++++ ca-fix-oprofile-ibs-check.patch ++++++
Fix BUG163976: Cannot profile IBS when build with OProfile-0.9.5 with option --with-oprofile
---
Index: src/ca/gui/oprofile_interface.cpp
===================================================================
--- src/ca/gui/oprofile_interface.cpp (revision 16837)
+++ src/ca/gui/oprofile_interface.cpp (working copy)
@@ -1144,15 +1144,16 @@
#if (OP_VERSION_BASE == 0x00903)
command = QString(OP_BINDIR) +
- "opcontrol --help 2>&1 " +
+ "/opcontrol --help 2>&1 " +
"| grep ibs-fetch 2> /dev/null > /dev/null";
ret = (system(command.ascii()) == 0)? true: false;
#endif
#if (OP_VERSION_BASE >= 0x00905)
+
command = QString(OP_BINDIR) +
- "oprofiled --help 2>&1 " +
+ "/oprofiled --help 2>&1 " +
"| grep ext-feature 2> /dev/null > /dev/null";
ret = (system(command.ascii()) == 0)? true: false;
#endif
++++++ ca-use-dynamic-feature-check.patch ++++++
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/gui/application.cpp CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/application.cpp
--- CodeAnalyst-gui-2.8.54/src/ca/gui/application.cpp 2009-06-18 06:54:47.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/application.cpp 2009-07-29 10:27:48.000000000 -0500
@@ -863,7 +863,7 @@ void ApplicationWindow::onSamplingStart
return;
}
- if (!m_opIf.checkIbsSupportInDaemon())
+ if (m_opIf.checkIbsSupportInDaemon() < 0 )
{
QMessageBox::critical (this, "CodeAnalyst Error",
QString("Current OProfile daemon does not supported IBS profile\n")
@@ -1482,14 +1482,15 @@ void ApplicationWindow:: enumerateAllIbs
if (pIbsSession->opSample && (*ev_it).op_name.contains("IBS_OP_")) {
bypass = false;
QString t = QString::number(pIbsSession->opInterval, 10);
-#if (OPD_NO_DISPATCH_OP_OPTION == 1)
- op_name = QString("event:") + (*ev_it).op_name +
- " count:" + t + " unit-mask:0";
-#else
- op_name = QString("event:") + (*ev_it).op_name +
- " count:" + t + " unit-mask:"
- + ((pIbsSession->opCycleCount)? "0" : "1") ;
-#endif
+
+ if (m_opIf.checkDispatchOpInDaemon() > 0) {
+ op_name = QString("event:") + (*ev_it).op_name +
+ " count:" + t + " unit-mask:"
+ + ((pIbsSession->opCycleCount)? "0" : "1") ;
+ } else {
+ op_name = QString("event:") + (*ev_it).op_name +
+ " count:" + t + " unit-mask:0";
+ }
}
if (bypass)
@@ -1506,13 +1507,12 @@ void ApplicationWindow:: enumerateAllIbs
if (pIbsSession->fetchSample
&& (*ev_it).op_name.contains("IBS_FETCH_"))
{
-#if (OP_VERSION_BASE >= 0x00905)
- // If specify list and not found
- if (pIbsSession->fetchList.size() != 0
- && pIbsSession->fetchList.find((*ev_it).value) == pIbsSession->fetchList.end())
- continue;
-#endif
-
+ if (m_opIf.checkIbsSupportInDaemon() >= 2) {
+ // If specify list and not found
+ if (pIbsSession->fetchList.size() != 0
+ && pIbsSession->fetchList.find((*ev_it).value) == pIbsSession->fetchList.end())
+ continue;
+ }
eet.eventCount = pIbsSession->fetchInterval;
eet.eventMask = (*ev_it).value;
@@ -1524,13 +1524,12 @@ void ApplicationWindow:: enumerateAllIbs
if (pIbsSession->opSample
&& (*ev_it).op_name.contains("IBS_OP_"))
{
-#if (OP_VERSION_BASE >= 0x00905)
- // If specify list and not found
- if (pIbsSession->opList.size() != 0
- && pIbsSession->opList.find((*ev_it).value) == pIbsSession->opList.end())
- continue;
-#endif
-
+ if (m_opIf.checkIbsSupportInDaemon() >= 2) {
+ // If specify list and not found
+ if (pIbsSession->opList.size() != 0
+ && pIbsSession->opList.find((*ev_it).value) == pIbsSession->opList.end())
+ continue;
+ }
eet.eventCount = pIbsSession->opInterval;
eet.eventMask = EncodeEventMask((*ev_it).value,
@@ -2911,64 +2910,64 @@ bool ApplicationWindow::runIbs ()
ibs_prop.dispatched_ops = 1;
}
-#if (OP_VERSION_BASE >= 0x00905)
- // NOTE: If the fetchList or opList is empty while it is being enabled,
- // we would add all fetch/op events to the list.
- // This would help keep the old IBS DCCOnfig compatible.
- bool fixFetchList = false;
- bool fixOpList = false;
-
- if (pIbsSession->fetchSample && pIbsSession->fetchList.size() == 0 )
- fixFetchList = true;
-
- if (pIbsSession->opSample && pIbsSession->opList.size() == 0 )
- fixOpList = true;
-
- if (fixFetchList || fixOpList) {
- EventList evList;
- m_eventFile.findIbsEvent(evList);
-
- EventList::iterator ev_it = evList.begin();
- EventList::iterator ev_end = evList.end();
- for(;ev_it != ev_end; ev_it++) {
- if (0xF000 <= (*ev_it).value && (*ev_it).value < 0xF100 && fixFetchList) {
- //fetch
- pIbsSession->fetchList.append((*ev_it).value);
- } else if (0xF100 <= (*ev_it).value && fixOpList) {
- //op
- pIbsSession->opList.append((*ev_it).value);
+ if (m_opIf.checkIbsSupportInDaemon() >= 2) {
+ // NOTE: If the fetchList or opList is empty while it is being enabled,
+ // we would add all fetch/op events to the list.
+ // This would help keep the old IBS DCCOnfig compatible.
+ bool fixFetchList = false;
+ bool fixOpList = false;
+
+ if (pIbsSession->fetchSample && pIbsSession->fetchList.size() == 0 )
+ fixFetchList = true;
+
+ if (pIbsSession->opSample && pIbsSession->opList.size() == 0 )
+ fixOpList = true;
+
+ if (fixFetchList || fixOpList) {
+ EventList evList;
+ m_eventFile.findIbsEvent(evList);
+
+ EventList::iterator ev_it = evList.begin();
+ EventList::iterator ev_end = evList.end();
+ for(;ev_it != ev_end; ev_it++) {
+ if (0xF000 <= (*ev_it).value && (*ev_it).value < 0xF100 && fixFetchList) {
+ //fetch
+ pIbsSession->fetchList.append((*ev_it).value);
+ } else if (0xF100 <= (*ev_it).value && fixOpList) {
+ //op
+ pIbsSession->opList.append((*ev_it).value);
+ }
}
- }
- }
+ }
+
+ // Convert list of IBS Fetch event number to op-name for oprofiled
+ QValueList<unsigned int>::iterator it = pIbsSession->fetchList.begin();
+ QValueList<unsigned int>::iterator it_end = pIbsSession->fetchList.end();
+ for (; it != it_end; it++)
+ {
+ CpuEvent event;
+ m_eventFile.findEventByValue(*it, event);
- // Convert list of IBS Fetch event number to op-name for oprofiled
- QValueList<unsigned int>::iterator it = pIbsSession->fetchList.begin();
- QValueList<unsigned int>::iterator it_end = pIbsSession->fetchList.end();
- for (; it != it_end; it++)
- {
- CpuEvent event;
- m_eventFile.findEventByValue(*it, event);
-
- if (0xF000 <= *it && *it < 0xF100) {
- //fetch
- ibs_prop.fetch_strList.append(event.op_name);
+ if (0xF000 <= *it && *it < 0xF100) {
+ //fetch
+ ibs_prop.fetch_strList.append(event.op_name);
+ }
}
- }
-
- // Convert list of IBS Op event number to op-name for oprofiled
- it = pIbsSession->opList.begin();
- it_end = pIbsSession->opList.end();
- for (; it != it_end; it++)
- {
- CpuEvent event;
- m_eventFile.findEventByValue(*it, event);
+
+ // Convert list of IBS Op event number to op-name for oprofiled
+ it = pIbsSession->opList.begin();
+ it_end = pIbsSession->opList.end();
+ for (; it != it_end; it++)
+ {
+ CpuEvent event;
+ m_eventFile.findEventByValue(*it, event);
- if (0xF100 <= *it) {
- //op
- ibs_prop.op_strList.append(event.op_name);
+ if (0xF100 <= *it) {
+ //op
+ ibs_prop.op_strList.append(event.op_name);
+ }
}
}
-#endif
ibs_prop.dcMissInfoEnabled = pIbsSession->dcMissInfoEnabled;
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/gui/CfgIbs.cpp CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/CfgIbs.cpp
--- CodeAnalyst-gui-2.8.54/src/ca/gui/CfgIbs.cpp 2009-06-23 16:41:21.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/CfgIbs.cpp 2009-07-29 10:27:48.000000000 -0500
@@ -21,6 +21,7 @@
#include "CfgIbs.h"
#include "iruncontrol.h"
#include "atuneoptions.h"
+#include "oprofile_interface.h"
#include
#include "xp.h"
@@ -213,11 +214,11 @@ void IbsCfgDlg::setProfile (ProfileColle
m_pOpInterval->setText (QString::number (ibsOptions.opInterval));
m_pOp->setChecked (ibsOptions.opSample);
-#if (OPD_NO_DCMISSINFO_OPTION == 0)
- m_pDcMissInfoEnabled->setChecked (ibsOptions.dcMissInfoEnabled);
-#else
- m_pDcMissInfoEnabled->hide();
-#endif
+ oprofile_interface opIf;
+ if (opIf.checkDCMissInfoInDaemon() > 0)
+ m_pDcMissInfoEnabled->setChecked (ibsOptions.dcMissInfoEnabled);
+ else
+ m_pDcMissInfoEnabled->hide();
// Check REV C support
char VendorId[15];
@@ -242,24 +243,24 @@ void IbsCfgDlg::setProfile (ProfileColle
m_pOpDispatch->setChecked (false);
}
-#if (OP_VERSION_BASE >= 0x00905)
- // Load events to IBS Fetch List
- QString file = helpGetEventFile(Family, Model);
- if( !m_eventsFile.open (file) )
- {
- QMessageBox::information( this, "Error",
- "Unable to open the events file: " + file);
- }
- addIbsEventFromFileToList(Model);
+ if (opIf.checkIbsSupportInDaemon() >= 2) {
+ // Load events to IBS Fetch List
+ QString file = helpGetEventFile(Family, Model);
+ if( !m_eventsFile.open (file) )
+ {
+ QMessageBox::information( this, "Error",
+ "Unable to open the events file: " + file);
+ }
+ addIbsEventFromFileToList(Model);
- selectIbsEvents(&ibsOptions);
-#else
- m_pFetchList->hide();
- m_pSelectAllFetch->hide();
- m_pOpList->hide();
- m_pSelectAllOp->hide();
- this->resize(0,0);
-#endif
+ selectIbsEvents(&ibsOptions);
+ } else {
+ m_pFetchList->hide();
+ m_pSelectAllFetch->hide();
+ m_pOpList->hide();
+ m_pSelectAllOp->hide();
+ this->resize(0,0);
+ }
m_pLaunchBox->hide();
m_modified = false;
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/gui/oprofile_interface.cpp CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/oprofile_interface.cpp
--- CodeAnalyst-gui-2.8.54/src/ca/gui/oprofile_interface.cpp 2009-07-29 10:28:41.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/oprofile_interface.cpp 2009-07-29 10:27:48.000000000 -0500
@@ -71,6 +71,9 @@ oprofile_interface::oprofile_interface (
m_isDaemonStarted = false;
m_daemon_pid = 0;
m_numEventCountersAvailable = 0;
+ m_ibsVersion = 0;
+ m_hasDispatchOpInDaemon = 0;
+ m_hasDCMissInfoInDaemon = 0;
CA_OPROFILE_CONTROLLER = simplifyPath(CA_OPROFILE_CONTROLLER);
}
@@ -290,63 +293,62 @@ int oprofile_interface::help_start_daemo
opd_args.append (event_args);
}
- //********************************************************
-#if (OP_VERSION_BASE >= 0x00905)
- // IBS2 stuff
- // --ext-feature=ibs:fetch:ev1,ev2,...,evN:fetch_count:fetch_um|op:ev1,ev2,...,evN:op_count:op_um
-
- buf = "";
- if( (active_profiling & OP_IBS_FETCH)
- || (active_profiling & OP_IBS_OP))
- opd_args.append("--ext-feature=ibs:");
-
- if (active_profiling & OP_IBS_FETCH) {
- buf = QString("fetch:") +
- m_pIbsProperties->fetch_strList.join(",") + ":" +
- QString::number(m_pIbsProperties->fetch_count) + ":" +
- QString::number(m_pIbsProperties->fetch_um);
- }
-
- if (active_profiling & OP_IBS_OP) {
- if (active_profiling & OP_IBS_FETCH)
- buf = buf + QString("\\|");
-
- buf = buf + QString("op:") +
- m_pIbsProperties->op_strList.join(",") + ":" +
- QString::number(m_pIbsProperties->op_count) + ":" +
- QString::number(m_pIbsProperties->op_um);
- }
- opd_args.append (buf);
+ if (checkIbsSupportInDaemon() == 2) {
+ //********************************************************
+ // IBS2 stuff
+ // --ext-feature=ibs:fetch:ev1,ev2,...,evN:fetch_count:fetch_um|op:ev1,ev2,...,evN:op_count:op_um
+
+ buf = "";
+ if( (active_profiling & OP_IBS_FETCH)
+ || (active_profiling & OP_IBS_OP))
+ opd_args.append("--ext-feature=ibs:");
-#else //(OP_VERSION_BASE >= 0x00905)
+ if (active_profiling & OP_IBS_FETCH) {
+ buf = QString("fetch:") +
+ m_pIbsProperties->fetch_strList.join(",") + ":" +
+ QString::number(m_pIbsProperties->fetch_count) + ":" +
+ QString::number(m_pIbsProperties->fetch_um);
+ }
- // IBS1 stuff
- buf = "";
- if( (active_profiling & OP_IBS_FETCH)
- || (active_profiling & OP_IBS_OP))
- opd_args.append("--events= ");
+ if (active_profiling & OP_IBS_OP) {
+ if (active_profiling & OP_IBS_FETCH)
+ buf = buf + QString("\\|");
- if (active_profiling & OP_IBS_FETCH) {
- buf.sprintf("--ibs-fetch=%ld ", m_pIbsProperties->fetch_count);
+ buf = buf + QString("op:") +
+ m_pIbsProperties->op_strList.join(",") + ":" +
+ QString::number(m_pIbsProperties->op_count) + ":" +
+ QString::number(m_pIbsProperties->op_um);
+ }
opd_args.append (buf);
- }
+ }
+ else if (checkIbsSupportInDaemon() == 1) {
+ // IBS1 stuff
+ buf = "";
+ if( (active_profiling & OP_IBS_FETCH)
+ || (active_profiling & OP_IBS_OP))
+ opd_args.append("--events= ");
- if (active_profiling & OP_IBS_OP) {
- buf.sprintf("--ibs-op=%ld ", m_pIbsProperties->op_count);
- opd_args.append (buf);
+ if (active_profiling & OP_IBS_FETCH) {
+ buf.sprintf("--ibs-fetch=%ld ", m_pIbsProperties->fetch_count);
+ opd_args.append (buf);
+ }
-#if (OPD_NO_DISPATCH_OP_OPTION == 0)
- if(m_pIbsProperties->dispatched_ops)
- opd_args.append ("--ibs-op-dispatch-op ");
-#endif
-
-#if (OPD_NO_DCMISSINFO_OPTION == 0)
- if(m_pIbsProperties->dcMissInfoEnabled)
- opd_args.append ("--ibs-op-dcmissinfo-enable ");
-#endif
+ if (active_profiling & OP_IBS_OP) {
+ buf.sprintf("--ibs-op=%ld ", m_pIbsProperties->op_count);
+ opd_args.append (buf);
+
+ if (checkDispatchOpInDaemon() > 0) {
+ if(m_pIbsProperties->dispatched_ops)
+ opd_args.append ("--ibs-op-dispatch-op ");
+ }
+
+ if (checkDCMissInfoInDaemon() > 0) {
+ if(m_pIbsProperties->dcMissInfoEnabled)
+ opd_args.append ("--ibs-op-dcmissinfo-enable ");
+ }
+ }
}
-#endif //(OP_VERSION_BASE >= 0x00905)
// END CMD LINE APPENDING.
@@ -1137,29 +1139,84 @@ bool oprofile_interface::havePermissionT
}
-bool oprofile_interface::checkIbsSupportInDaemon()
+int oprofile_interface::checkIbsSupportInDaemon()
{
- bool ret = false;
QString command;
+
+ if (m_ibsVersion != 0)
+ goto out;
-#if (OP_VERSION_BASE == 0x00903)
+ // CA-OProfile-0.9.3
command = QString(OP_BINDIR) +
"/opcontrol --help 2>&1 " +
"| grep ibs-fetch 2> /dev/null > /dev/null";
- ret = (system(command.ascii()) == 0)? true: false;
-#endif
+ if (system(command.ascii()) == 0) {
+ m_ibsVersion = 1;
+ goto out;
+ }
-#if (OP_VERSION_BASE >= 0x00905)
-
+ // OProfile-0.9.5
command = QString(OP_BINDIR) +
"/oprofiled --help 2>&1 " +
"| grep ext-feature 2> /dev/null > /dev/null";
- ret = (system(command.ascii()) == 0)? true: false;
-#endif
- return ret;
+ if (system(command.ascii()) == 0) {
+ m_ibsVersion = 2;
+ goto out;
+ }
+
+ m_ibsVersion = -1;
+out:
+ return m_ibsVersion;
}
+
+int oprofile_interface::checkDispatchOpInDaemon()
+{
+ bool ret = false;
+ QString command;
+
+ if (m_hasDispatchOpInDaemon != 0)
+ goto out;
+
+ // CA-OProfile-0.9.3
+ command = QString(OP_BINDIR) +
+ "/opcontrol --help 2>&1 " +
+ "| grep ibs-op-dispatch-op 2> /dev/null > /dev/null";
+
+ ret = (system(command.ascii()) == 0)? true: false;
+ if (ret)
+ m_hasDispatchOpInDaemon = 1;
+ else
+ m_hasDispatchOpInDaemon = -1;
+out:
+ return m_hasDispatchOpInDaemon;
+}
+
+
+int oprofile_interface::checkDCMissInfoInDaemon()
+{
+ bool ret = false;
+ QString command;
+
+ if (m_hasDCMissInfoInDaemon != 0)
+ goto out;
+
+ // CA-OProfile-0.9.3
+ command = QString(OP_BINDIR) +
+ "/opcontrol --help 2>&1 " +
+ "| grep ibs-op-dcmissinfo-enable 2> /dev/null > /dev/null";
+
+ ret = (system(command.ascii()) == 0)? true: false;
+ if (ret)
+ m_hasDCMissInfoInDaemon = 1;
+ else
+ m_hasDCMissInfoInDaemon = -1;
+out:
+ return m_hasDCMissInfoInDaemon;
+}
+
+
bool oprofile_interface::checkMuxSupportInDaemon()
{
// NOTE: This check allows only the CodeAnalyst Oprofile
diff -paurN CodeAnalyst-gui-2.8.54/src/ca/gui/oprofile_interface.h CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/oprofile_interface.h
--- CodeAnalyst-gui-2.8.54/src/ca/gui/oprofile_interface.h 2009-06-10 15:45:23.000000000 -0500
+++ CodeAnalyst-gui-2.8.54-user-dynamic-feature-check/src/ca/gui/oprofile_interface.h 2009-07-29 10:27:48.000000000 -0500
@@ -94,7 +94,11 @@ public:
bool codeanalyst_service_status();
- bool checkIbsSupportInDaemon();
+ int checkIbsSupportInDaemon();
+
+ int checkDispatchOpInDaemon();
+
+ int checkDCMissInfoInDaemon();
bool checkMuxSupportInDaemon();
@@ -134,19 +138,18 @@ private:
QString simplifyPath(QString path);
private:
- op_ibs_property * m_pIbsProperties;
-
- op_event_property m_EventProperties[MAX_EVENTNUM_MULTIPLEXING];
-
- QProcess * m_proc;
-
- QString m_StdErr;
- QString m_StdOut;
+ QProcess * m_proc;
+ op_ibs_property * m_pIbsProperties;
+ op_event_property m_EventProperties[MAX_EVENTNUM_MULTIPLEXING];
+ QString m_StdErr;
+ QString m_StdOut;
+ int m_numEventCountersAvailable;
+ bool m_isDaemonStarted;
+ unsigned int m_daemon_pid;
+ int m_ibsVersion;
+ int m_hasDispatchOpInDaemon;
+ int m_hasDCMissInfoInDaemon;
- int m_numEventCountersAvailable;
-
- bool m_isDaemonStarted;
- unsigned int m_daemon_pid;
};
#endif
++++++ ca-use-oprofile-default-buffersize.patch ++++++
diff -paurN CodeAnalyst-gui-2.8.54-org/src/ca/gui/atuneoptions.h CodeAnalyst-gui-2.8.54/src/ca/gui/atuneoptions.h
--- CodeAnalyst-gui-2.8.54-org/src/ca/gui/atuneoptions.h 2009-06-10 15:45:23.000000000 -0500
+++ CodeAnalyst-gui-2.8.54/src/ca/gui/atuneoptions.h 2009-07-08 22:04:40.000000000 -0500
@@ -117,9 +117,9 @@ enum ChartDensityShownType
enum BuffDefaultSizeType
{
- OP_DEFAULT_BUFFER_SIZE = 4194304,
- OP_DEFAULT_WATERSHED_SIZE = 131072,
- OP_DEFAULT_CPU_BUFFER_SIZE = 32768
+ OP_DEFAULT_BUFFER_SIZE = 131072,
+ OP_DEFAULT_WATERSHED_SIZE = 32768,
+ OP_DEFAULT_CPU_BUFFER_SIZE = 8192
};
#define OPT_IMPORT_TYPE OPT_DATA_PREFIX "/ImportType"
++++++ destdir.patch ++++++
--- src/ca/Makefile.am
+++ src/ca/Makefile.am
@@ -8,11 +8,11 @@
install-exec-hook:
@if test -e "scripts/Setup.sh"; then \
- scripts/Setup.sh $(prefix); \
+ scripts/Setup.sh $(DESTDIR)$(prefix); \
fi
uninstall-hook:
@if test -e "scripts/Uninstall.sh"; then \
- scripts/Uninstall.sh $(prefix);\
+ scripts/Uninstall.sh $(DESTDIR)$(prefix);\
fi
--- src/ca/gui/Makefile.am
+++ src/ca/gui/Makefile.am
@@ -226,11 +226,11 @@
$(UIC) -o $@ -impl $*.h $*.ui
install-exec-hook:
- mkdir -p $(prefix)/share/codeanalyst/Configs/DCConfig
- cp -r ../Configs/DCConfig $(prefix)/share/codeanalyst/Configs/
- mkdir -p $(prefix)/share/codeanalyst/Configs/ViewConfig
- cp -r ../Configs/ViewConfig $(prefix)/share/codeanalyst/Configs/
- rm -rf `find $(prefix)/share/codeanalyst/Configs -name .svn`
+ mkdir -p $(DESTDIR)$(prefix)/share/codeanalyst/Configs/DCConfig
+ cp -r ../Configs/DCConfig $(DESTDIR)$(prefix)/share/codeanalyst/Configs/
+ mkdir -p $(DESTDIR)$(prefix)/share/codeanalyst/Configs/ViewConfig
+ cp -r ../Configs/ViewConfig $(DESTDIR)$(prefix)/share/codeanalyst/Configs/
+ rm -rf `find $(DESTDIR)$(prefix)/share/codeanalyst/Configs -name .svn`
uninstall-hook:
- rm -rf $(prefix)/share/codeanalyst/Configs
+ rm -rf $(DESTDIR)$(prefix)/share/codeanalyst/Configs
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org