Revision: 1321
Author: [email protected]
Date: Thu Jul  1 15:33:31 2010
Log: Updates to MemoryProfiling.pod, including links to email threads.

http://code.google.com/p/perl-devel-nytprof/source/detail?r=1321

Modified:
 /trunk/MemoryProfiling.pod

=======================================
--- /trunk/MemoryProfiling.pod  Thu Jul  1 10:43:41 2010
+++ /trunk/MemoryProfiling.pod  Thu Jul  1 15:33:31 2010
@@ -4,37 +4,52 @@
 Somewhere to gather the info so it'll be easier to find when someone
 wants to work on it.

-Generalize the concepts of clocks. Have a structure defining a 'clock' with
-pointers to functions to get the time, subtract times to get ticks, return
-the resolution etc. Give them names and attributes (cpu, realtime etc).
-User could then pick a clock by name. By default we'd pick the best available -realtime clock (or best available cputime clock if usecputime=1 option set).
+It's also focussed on runtime profiling of total memory usage over time
+(rather than a detailed analysis of who 'owns' what memory as some particular
+point in time, like the end of the program).
+
+NYTProf currently only measures time and supports a limited range of "clocks"
+(realtime vs cputime). For profiling memory we need to add a new kind of
+"clock" that measures memory usage. Since we're generalizing the concept of
+what gets measured (and how we get the info from the system) a better name
+than "clock" would be "probe".

 Conjectural terminology:

- "clock" means some measuring mechanism like get_clock(), times(), getrusage(), + "Probe" means some measuring mechanism like get_clock(), times(), getrusage(),
     that may yield multiple pieces of information with a single call.

-    "measure" is one specific item generated by a clock.
-
-    Clock "time"=times(), measures: "time.user", "time.user+sys" etc
- Clock "clock"=clock_gettime(), measures: "clock.realtime", "clock.monotonic" etc - Clock "rusage"=getrusage(), measures: "rusage.majflt", "rusage.nvcsw" etc
-    Clock "memory" measures: "memory.bytes", "mem.allocs" etc
-    Clock "arena" measures: "arena.svs", "arena.bytes" etc
-
-Clocks need to be abstracted. Probably via a structure with function pointers
-plus ways to copy clock output (struct) and get the difference between two
-clock outputs.
-
-Use the differencing logic where we currently handle times in the statement and
+    "Measure" is one specific item generated by a probe.
+
+    Probe "time"   uses times(), measures: "time.user", "time.user+sys" etc
+ Probe "clock" uses clock_gettime(), measures: "clock.realtime", "clock.monotonic" etc + Probe "rusage" uses getrusage(), measures: "rusage.majflt", "rusage.nvcsw" etc
+    Probe "memory" measures: "memory.bytes", "mem.allocs" etc
+    Probe "arena"  measures: "arena.svs", "arena.bytes" etc
+
+Generalize the concepts of probes. Have a structure defining a 'probe' with
+pointers to functions to get the values, subtract values to get relative ticks, +return the tick units etc. Give them names and attributes (cpu, realtime etc). +User could then pick a probe by name. By default we'd pick the best available +realtime probe (or best available cputime probe if usecputime=1 option set). +Use the subtraction logic where we currently handle times in the statement and
 subroutine profilers.

 =head1 Email threads

-XXX find the various threads
-
-XXX plus Nicholas's experimental patch
+"Memory profiling in Devel::NYTProf?: - June 2009
+http://groups.google.com/group/develnytprof-dev/browse_frm/thread/1df4cba3001cd4e4/136812b44e9f7631
+Talking about the problems of measuring memory usage of the whole process re:
+http://blog.robin.smidsrod.no/index.php/2009/05/26/memory-footprint-of-popular-cpan-modules
+
+"Memory profiling possibilities in NYTProf" - September 2009
+http://groups.google.com/group/develnytprof-dev/browse_frm/thread/c711c132216a3cea/035012e3dc2971ec
+This includes a detailed overview of the issues.
+
+"profiling memory" - Dec 2009
+http://groups.google.com/group/develnytprof-dev/browse_frm/thread/5ffd24200866b0c1/201b58c18d826aaa
+Nicholas Clark offers an experimental patch that intercepts malloc and free
+and makes NYTProf measure memory usage.

 =head1 Possibly Relevant Perl Modules

--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]

Reply via email to