Soeren Sandmann 2af6447238 Primitive loading and saving.
Wed Mar 23 00:04:07 2005  Soeren Sandmann  <sandmann@redhat.com>

	Primitive loading and saving.

	* sysprof.c (on_open_clicked): Hook up loading.

	* sfile.c: Add a copy of g_file_replace() from glib CVS HEAD.

	* sfile.c (add_string): Escape and quote the string

	* sfile.c (sfile_load): Initialize current_instruction and
	instructions_by_location

	* sfile.c (post_process_instructions_recurse): Handle NULL
	pointers properly.

	* sfile.c (handle_begin_element, handle_end_element, handle_text):
	Move error handling here from state_transition_begin/text/end.

	* sfile.c (handle_text): Discard whitespace-only strings

	* sfile.c (sfile_get_pointer, sfile_get_integer,
	sfile_get_string): expect both begin, value, and end transitions.

	* sfile.c (hook_up_pointers): Only treat instructions as pointer
	values when they are. Handle NULL targets properly.

	* sfile.c (get_number): Fix a few read-freed-data bugs

	* profile.c (profile_load): Call sfile_end_get() for the profile;
	build the nodes_by_objects hash table. Build the call tree.

	* profile.c (create_format): Don't store next pointer, but do
	store total, self and toplevel.

	* profile.c (make_hash_table): New function to build
	nodes_by_object hashtable from loaded data
2005-03-23 05:05:57 +00:00
2004-11-23 00:10:55 +00:00
2004-04-29 17:29:09 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00
2005-03-23 05:05:57 +00:00
2005-03-05 06:16:47 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00
2005-03-23 05:05:57 +00:00
2005-03-23 05:05:57 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00
2004-11-12 23:27:52 +00:00
2005-03-23 05:05:57 +00:00
2004-11-06 00:59:25 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00
2004-04-27 11:08:55 +00:00

Sysprof is a sampling profiler that uses a kernel module, sysprof-module.ko,
to generate stacktraces which are then interpreted by the userspace
program "sysprof".

- There is no auto* stuff. Just type "make" and hope for the best

- You need gtk+ 2.4.0 or better. If you are using gtk+ 2.6 or newer
  you also need libglade cvs HEAD.

- You need a 2.6 kernel. On SMP kernels the module produces unreliable data.

- The module must be compiled with the same compiler that compiled the 
  kernel it is going to be used with. For most systems that is just
  the system compiler, but if you have upgraded your kernel it is
  possible the one was compiled with a difference compiler.

  In that case, "insmod sysprof-module.ko" will produce this 
  error message:

    insmod: error inserting './sysprof-module.o': -1 Invalid module format

- The programs you want to profile should have debugging symbols, or
  you won't get much usable information. On a Fedora Core system,
  installing the relevant -debuginfo packages should do the trick.

- To get usable data on the X server:

  (1) Compile the X server to use ".so" modules:

	- Uncomment the line "MakeDllModules	Yes" in 
	  xc/config/cf/xorgsite.def

	- "make World"

  (2) Install the X server making sure it can't see any ".a" files. If
      you install on top of an existing installation, just do

	  find /usr/X11R6/lib/"*.a" | sudo xargs rm

      and install the newly compiled X server. 

      If a ".so" X server finds .a files in its module path it will
      try to load those in preference to .so files and this causes
      symbol resolution problems

  (3) Run your new X server

  (4) Run sysprof as root. This is necessary because the X server binary 
      for security reasons is not readable by regular users. I could tell
      you why, but then I'd have to kill you.


Credits:
      Kristian Høgsberg for the first port to the 2.6 kernel.
      Owen Taylor for the symbol lookup code in memprof
	

Søren   (sandmann@daimi.au.dk)
Description
Languages
C 98.9%
Meson 1%