From: graydon h. <gr...@re...> - 2002-10-17 20:54:47
Attachments:
oprofile-libabi.patch
|
hi, attached is a patch which creates a new directory in the oprofile sources, libabi/, and adds a few files which can analyze, write, and convert between abi descriptions. it also hooks into dae/oprofiled.c and daemon/oprofiled.c to write out an abi description to /var/lib/oprofile/abi when the daemon starts. with these in place, I have successfully converted sample files built on an alpha and a ppc to an x86 machine's native format, for analysis. there are probably still some bugs in it but I think this approach is workable and will have only minimal interferance with other activity. -graydon |
From: graydon h. <gr...@re...> - 2002-10-17 21:54:35
|
On Thu, 2002-10-17 at 16:54, graydon hoare wrote: > with these in place, I have successfully converted sample files built on > an alpha and a ppc to an x86 machine's native format, for analysis. > there are probably still some bugs in it but I think this approach is > workable and will have only minimal interferance with other activity. sorry, just to clarify here: I certainly do *not* have oprofile's kernel stuff ported to ppc or alpha. I simply removed the kernel part of the configure script and built the user space stuff (libdb, libabi, and the abi_test program) in an attempt to get some "naturally occurring" test cases of other abis. -graydon |
From: John L. <le...@mo...> - 2002-10-17 21:54:50
|
On Thu, Oct 17, 2002 at 04:54:36PM -0400, graydon hoare wrote: > attached is a patch which creates a new directory in the oprofile > sources, libabi/, and adds a few files which can analyze, write, and > convert between abi descriptions. it also hooks into dae/oprofiled.c and > daemon/oprofiled.c to write out an abi description to > /var/lib/oprofile/abi when the daemon starts. Just browsed the patch, but it looks good, I think. > --- configure.in Thu Oct 17 14:10:08 2002 > +++ configure.in Thu Oct 17 14:58:46 2002 I think I'd prefer an --enable-abi. Most of us don't care about abi. > +Abi_exception::Abi_exception(string const d) : desc(d) {} Hmm. Phil, what's the situation with exceptions ? > +} > + > +int Abi::need(string const key) const throw (Abi_exception) Two lines between functions please ;) > +bool Abi::operator==(Abi const & other) const > +{ > + for (map<string,int>::const_iterator i = slots.begin(); > + i != slots.end(); ++i) { > + if (other.slots.find(i->first) == other.slots.end() || > + other.slots.find(i->first)->second != i->second) > + return false; > + } > + return true; > +} typedef map<string,int> I'd prefer something like : Whatever::const_iterator it = slots.begin(); Whatever::const_iterator const end = slots.end(); and please factor out the other.slots with a local reference. You might even use functor. > + string const desc; std::string and elsewhere > + Abi curr; > + if (abi_filename.size() > 0) { tabs not spaces > + header->ctr_count = 0xdeafbeef; A variation on the usual one ;) Phil ? regards john -- "It's a cardboard universe ... and if you lean too hard against it, you fall through." - Philip K. Dick |
From: Philippe E. <ph...@wa...> - 2002-10-17 23:38:00
|
John Levon wrote: > On Thu, Oct 17, 2002 at 04:54:36PM -0400, graydon hoare wrote: dae/daemon Makefile + $(CXX) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBS) John, it's ok for you to compile all dae/daamon in C++ ? >>+Abi_exception::Abi_exception(string const d) : desc(d) {} > > > Hmm. Phil, what's the situation with exceptions ? derive them from std::exception >>+ string const desc; > > > std::string and elsewhere std::in all header, using namespace std; in source file please > Phil ? ok regards, Phil |
From: John L. <le...@mo...> - 2002-10-17 23:44:35
|
On Fri, Oct 18, 2002 at 01:38:07AM +0000, Philippe Elie wrote: > John, it's ok for you to compile all dae/daamon in C++ ? Yeah, why not. > derive them from std::exception I meant old compilers / -fno-exceptions regards john -- "It's a cardboard universe ... and if you lean too hard against it, you fall through." - Philip K. Dick |
From: Philippe E. <ph...@wa...> - 2002-10-18 00:20:23
|
John Levon wrote: > On Fri, Oct 18, 2002 at 01:38:07AM +0000, Philippe Elie wrote: > > >>John, it's ok for you to compile all dae/daamon in C++ ? > > > Yeah, why not. So just don't us enum field in struct shared between dae/module >>derive them from std::exception > > > I meant old compilers / -fno-exceptions for 2.91 it seems ok, and we will not support -fno-exceptions ? regards, Phil |
From: graydon h. <gr...@re...> - 2002-10-18 01:48:29
|
On Thu, 2002-10-17 at 22:20, Philippe Elie wrote: > John Levon wrote: > > On Fri, Oct 18, 2002 at 01:38:07AM +0000, Philippe Elie wrote: > > > > > >>John, it's ok for you to compile all dae/daamon in C++ ? > > > > > > Yeah, why not. > > So just don't us enum field in struct shared > between dae/module The only part I changed is the compiler driver used to do the final link; this is the equivalent of adding in -lstdc++ and possibly some flags related to static constructors. I did not alter the driver used to compile each individual C file. -graydon |
From: Philippe E. <ph...@wa...> - 2002-10-18 03:22:15
|
graydon hoare wrote: > On Thu, 2002-10-17 at 22:20, Philippe Elie wrote: > >>>>John, it's ok for you to compile all dae/daamon in C++ ? >>> >>> >>>Yeah, why not. >> >>So just don't us enum field in struct shared >>between dae/module > > > The only part I changed is the compiler driver used to do the final > link; this is the equivalent of adding in -lstdc++ and possibly some > flags related to static constructors. I did not alter the driver used to > compile each individual C file. oh, sorry I misread op_abi.h and your change in Makefile.in Phil |
From: graydon h. <gr...@re...> - 2002-10-18 06:12:10
Attachments:
oprofile-libabi-2.patch
|
On Thu, 2002-10-17 at 17:51, John Levon wrote: > Just browsed the patch, but it looks good, I think. Here is round 2, with the changes you requested. -graydon |
From: John L. <le...@mo...> - 2002-10-19 21:27:31
|
On Fri, Oct 18, 2002 at 02:12:00AM -0400, graydon hoare wrote: > Here is round 2, with the changes you requested. Applied (I had to remove AC_HELP_STRING, it is a neologism it seems). Please submit a follow up patch to document --enable-abi thanks john |
From: John L. <le...@mo...> - 2002-10-19 21:32:44
|
On Sat, Oct 19, 2002 at 10:24:20PM +0100, John Levon wrote: > Please submit a follow up patch to document --enable-abi And op_import. john -- "It's a cardboard universe ... and if you lean too hard against it, you fall through." - Philip K. Dick |
From: graydon h. <gr...@re...> - 2002-10-21 12:58:48
Attachments:
oprofile-abi-doc.patch
|
On Sat, 2002-10-19 at 17:29, John Levon wrote: > On Sat, Oct 19, 2002 at 10:24:20PM +0100, John Levon wrote: > > > Please submit a follow up patch to document --enable-abi > > And op_import. ok, doc update attached. -graydon |
From: John L. <le...@mo...> - 2002-10-21 16:50:37
|
On Mon, Oct 21, 2002 at 08:58:38AM -0400, graydon hoare wrote: > ok, doc update attached. applied thanks john -- "Lots of companies would love to be in our hole." - Scott McNealy |