Skip site navigation (1)Skip section navigation (2)

CVS log for src/tools/sched/schedgraph.py

[BACK] Up to [FreeBSD] / src / tools / sched

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.25.4.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.25.4.1: preferred, colored
Changes since revision 1.25.4.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.25.4.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.12.2.1.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.12.2.1: preferred, colored; next MAIN 1.12.6.1: preferred, colored
Changes since revision 1.12.2.1: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.25.2.1.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.25.2.1: preferred, colored; next MAIN 1.25.4.1: preferred, colored
Changes since revision 1.25.2.1: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.25.2.1.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.25.2.1: preferred, colored; next MAIN 1.25.4.1: preferred, colored
Changes since revision 1.25.2.1: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.12.2.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.12.2.1: preferred, colored; next MAIN 1.12.6.1: preferred, colored
Changes since revision 1.12.2.1: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.25.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.25.2.1: preferred, colored; next MAIN 1.25.4.1: preferred, colored
Changes since revision 1.25.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.25.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP, RELENG_8_0_BP
Branch point for: RELENG_8_2, RELENG_8_1, RELENG_8_0
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.12.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.12.2.1: preferred, colored; next MAIN 1.12.6.1: preferred, colored
Changes since revision 1.12.2.1: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Thu Jan 29 18:33:46 2009 UTC (3 years ago) by jhb
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP, RELENG_7_2_BP
Branch point for: RELENG_7_4, RELENG_7_3, RELENG_7_2
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +352 -101 lines
SVN rev 187896 on 2009-01-29 18:33:46Z by jhb

Merge all the changes in HEAD prior to the generic tracing changes.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Jan 22 06:21:30 2009 UTC (3 years ago) by jeff
Branches: MAIN
CVS tags: RELENG_9_BP, RELENG_8_BP, HEAD
Branch point for: RELENG_9, RELENG_8
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +27 -16 lines
SVN rev 187580 on 2009-01-22 06:21:30Z by jeff

 - Update my copyright.
 - Print human readable time as a float with two digits of precision.  Use
   ns now as well since clock periods are well into the hundreds of
   picoseconds now.
 - Show the average duration in the stats frame.  This is often more useful
   than total duration.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Jan 20 12:33:04 2009 UTC (3 years ago) by jeff
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +54 -20 lines
SVN rev 187471 on 2009-01-20 12:33:04Z by jeff

 - Permit timestamps to be as far as 2048 ticks apart before we complain
   about invalid timestamps.  Nehalem CPUs seem to be synchronized but only
   within a fraction of a microsecond.
 - Make the Counter code more flexible to poor timestamps.  In general we
   now complain a lot but render as much as we can.
 - Change the scaler behavior so it works better with very long and very
   short traces.  We now set the maximum scale such that it properly
   displays the entire file by default and doesn't permit zooming out
   beyond the file.  This improves other awkward navigation behavior.
   The interval is now set very small which can't be achieved by simply
   dragging the mouse.  Clicking to the left of or right of the scaler bar
   will produce increments of a single, very small, interval now.

Sponsored by:   Nokia

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Jan 18 05:44:31 2009 UTC (3 years ago) by jeff
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +36 -24 lines
SVN rev 187379 on 2009-01-18 05:44:31Z by jeff

 - Add summary information to the title once the file is parsed rather than
   printing it to the terminal.  Now only parse errors go to the terminal.
 - Speedup drawing by raising and lowering tags only once everything has
   been drawn.  Surprisingly, it now takes a little longer to parse than
   it does to draw.
 - Parameterize the layout with X_ and Y_ defines that determine the sizes
   of various things.
 - Remove unnecessary tags.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Jan 18 04:49:01 2009 UTC (3 years ago) by jeff
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +224 -31 lines
SVN rev 187376 on 2009-01-18 04:49:01Z by jeff

 - Significantly speedup hiding and displaying multiple rows by writing an
   optimized single pass function for each.  This reduces the number of
   tkinter calls required to the minimum.
 - Add a right-click context menu for sources.  Supported commands hide
   the source, hide the whole group the source is in, and bring up a stat
   window.
 - Add a source stat frame that gives an event frequency table as well as
   the total duration for each event type that has a duration.  This can
   be used to see, for example, the total time a thread spent running or
   blocked by a wchan or lock.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Jan 17 11:19:15 2009 UTC (3 years ago) by jeff
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +173 -4 lines
SVN rev 187359 on 2009-01-17 11:19:15Z by jeff

 - Add a new source configuration menu option that allows hiding and
   displaying sources.
 - Add functions to the main SchedGraph to facilitate source hiding.  The
   source is simply moved off screen and all other sources are moved to
   compensate.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Jan 17 07:24:25 2009 UTC (3 years ago) by jeff
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +607 -1001 lines
SVN rev 187358 on 2009-01-17 07:24:25Z by jeff

 - Rewrite the parser to support the new generic schedgraph interface.
   This no longer requires any custom classes or parsers to support new
   event types.
 - Add an optional command line argument for specifying the clock frequency
   in ghz.  This is useful for traces that do not include KTR_SCHED.

Sponsored by:	Nokia

 - Add support for sorting rows by clicking and dragging them to their new
   position.
 - Add support for configuring the cpu background colors.
 - Improve the scaling so a better center is maintained as you zoom.  This
   is not perfect due to precision loss with floats used in the window
   views.
 - Add new colors and a random assignment for unknown event types.  A table
   is used for known event types.  This is the only event specific
   information.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Jan 13 16:44:18 2009 UTC (3 years ago) by jhb
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +224 -2 lines
SVN rev 187156 on 2009-01-13 16:44:18Z by jhb

Add support for two new event source types:
- Callwheels traced via KTR_CALLOUT.  Each CPU is assigned a callwheel
  source.  The events on this source are the execution of individual callout
  routines.  Each routine shows up as a green rectangle while it is executed
  and the event details include the function pointer and argument.
- Locks traced via KTR_LOCK.  Currently, each lock name is assigned an event
  source (since the existing KTR_LOCK traces only include lock names and
  not pointers).  This does mean that if multiple locks of the same name are
  manipulated, the source line for that name may be confusing.  However, for
  many cases this can be useful.  Locks are blue when they are held and
  purple when contested.  The contention support is a bit weak due to
  limitations in the rw_rlock() and mtx_lock_spin() logging messages
  currently.  I also have not added support for contention on lockmgr,
  sx, or rmlocks yet.  What is there now can be profitably used to examine
  activity on Giant however.
- Expand the width of the event source names column a bit to allow for some
  of the longer names of these new source types.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Jan 13 16:33:10 2009 UTC (3 years ago) by jhb
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +46 -13 lines
SVN rev 187155 on 2009-01-13 16:33:10Z by jhb

- Add some rudimentary support for sorting the list of event sources
  (threads, CPU load counters, etc.).  Each source is tagged with a group
  and an order similar to the SYSINIT SI_SUB_* and SI_ORDER_*.  After
  the file is parsed, all the sources are then sorted.  Currently, the only
  affects of this are that the CPU loads are now sorted by CPU ID (so
  CPU 0 is always first).  However, this makes it easier to add new types
  of event sources in the future and have them all clustered together
  instead of intertwined with threads.
- Python lists perform insertions at the tail much faster than insertions
  at the head.  For a trace that had a lot of events for a single event
  source, the constant insertions of new events to the head of the
  per-source event list caused a noticable slow down.  To compensate,
  append new events to the end of the list during parsing and then
  reverse the list prior to drawing.
- Somewhere in the tkinter internals the coordinates of a canvas are
  stored in a signed 32-bit integer.  As a result, if an the box for
  an event spans 2^31, it would actually end up having a negative
  X offset at one end.  The result was a single box that covered the
  entire event source.  Kris worked around this for some traces by
  bumping up the initial ticks/pixel ratio from 1 to 10.  However, a
  divisor of 10 can still be too small for large tracefiles (e.g.
  with 4 million entries).  Instead of hardcoding the initial scaling
  ratio, calculate it from the time span of the trace file.
- Add support for using the mouse wheel to scroll the graph window
  up and down.

Revision 1.12.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.6.12.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.6: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sat Apr 26 05:02:48 2008 UTC (3 years, 9 months ago) by jeff
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -70 lines
 - Remove cumbersome and inaccurate attempt at synchronizing the timestamps
   post collection.  This is too error prone and introduces uncertainty into
   the timing.  We'll simply have to require synchronized TSCs to run
   schedgraph on MP.

Sponsored by:	Nokia

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Jan 25 19:24:12 2008 UTC (4 years ago) by jhb
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -2 lines
Update the timestamp regexps in syncstamp() and monostamp() for > 99999
traces where there isn't any leading whitespace before the record number
in the ktrdump output.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Jan 13 22:46:24 2008 UTC (4 years ago) by kris
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -2 lines
* Remove KTR_CPUMASK, it is not correct to set this

* Explain why 32768 entries is usually not enough

* Increase the scaling ratio to 10 to deal with 32-bit overflows that
  can occur in calculating the canvas offsets

Revision 1.14: download - view: text, markup, annotated - select for diffs
Mon Nov 19 04:46:37 2007 UTC (4 years, 2 months ago) by sam
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +63 -18 lines
o expand usage comments; add cut&paste items for bozo's like me
o add things i want to TODO list
o add Record entry to each event which back-maps to the line # in the ktr file;
  useful for finding local context when the ktr file has lots of items that
  schedgraph doesn't grok
o add missing KTR_SCHED event handlers
o expose Counter max value through a ymax method for widget building
o show timestamps in records rejected 'cuz time goes backwards

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Nov 12 17:33:07 2007 UTC (4 years, 2 months ago) by jeff
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +19 -4 lines
 - Fix the ktr header regexp so we match lines with very large indexes.
 - Add support for messages where cpu load is added to a remote cpu.
 - print unmatched lines to stdout

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Apr 22 06:20:12 2007 UTC (4 years, 9 months ago) by kris
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_1, RELENG_7
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +15 -1 lines
Add some notes clarifying usage and a couple of known bugs

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jan 24 21:19:56 2007 UTC (5 years ago) by jeff
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +112 -28 lines
 - Add a horrible bit of code to detect tsc differences between processors.
   This only works if there is no significant drift and all processors are
   running at the same frequency.  Fortunately, schedgraph traces on MP
   machines tend to cover less than a second so drift shouldn't be an issue.
 - KTRFile::synchstamp() iterates once over the whole list to determine the
   lowest tsc value and syncs adjusts all other values to match.  We assume
   that the first tick recorded on all cpus happened at the same instant to
   start with.
 - KTRFile::monostamp() iterates again over the whole file and checks for
   a cpu agnostic monotonically increasing clock.  If the time ever goes
   backwards the cpu responsible is adjusted further to fit.  This will
   make the possible incorrect delta between cpus as small as the shortest
   time between two events.  This time can be fairly large due to sched_lock
   essentially protecting all events.
 - KTRFile::checkstamp() now returns an adjusted timestamp.
 - StateEvent::draw() detects states that occur out of order in time and
   draws them as 0 pixels after printing a warning.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue Jan 23 22:19:27 2007 UTC (5 years ago) by jeff
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +7 -7 lines
 - Print clock information so we know if something is not reported correctly
   from the tsc.
 - Set skipnext = 1 for yielding and preempted events so we don't show the
   event that adds us back to the run queue.  It used to be 2 so we would
   skip the ksegrp run queue addition and the system run queue addition
   but the ksegrp run queue has gone away.
 - Don't display down to nanosecond resolution for scheduling events right
   now.  This can sometimes cause a division by zero.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Jan 6 04:40:44 2007 UTC (5 years, 1 month ago) by jeff
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +8 -0 lines
 - Add colors for up to 8 cpus.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Nov 21 21:27:40 2005 UTC (6 years, 2 months ago) by scottl
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +18 -0 lines
Teach schedgraph how to parse KTR_CRITICAL records.  critical_enter/exit
events are now plotted as a counting graph, similar to CPU load, so that
their duration and critnest values can be visualized.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Nov 6 17:43:25 2005 UTC (6 years, 3 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +2 -2 lines
Fix two minor typos that caused schedgraph to exit with an exception
when running on traces referencing >2 CPUs.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Mar 14 11:52:24 2005 UTC (6 years, 10 months ago) by jeff
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0, RELENG_6
Branch point for: RELENG_6_4
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +0 -1 lines
 - ktrace(1) has nothing to do with schedgraph.  Remove that from the
   instructions.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Dec 28 00:49:02 2004 UTC (7 years, 1 month ago) by arr
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +11 -0 lines
- Add some notes on what is required to run schedgraph.py successfully.
  This was pulled from Jeff Roberson's email to current@ "the other day."

Approved by: jeff@

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Dec 26 03:25:08 2004 UTC (7 years, 1 month ago) by jeff
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -3 lines
 - For preemption and yield events, we want to skip the next two state events
   as they are the setrunqueue() and sched_add() calls.  Since they happen
   immediately before the thread is placed on a run queue they would normally
   dwarf the more informative preemption or yield event and it is implicitly
   understood that a thread is back on the run queue as part of these events.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Dec 26 02:02:34 2004 UTC (7 years, 1 month ago) by jeff
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -0 lines
 - Call self.checkstamp() in the cpu load parsing functions in case the
   timestamp has wrapped.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Dec 26 01:18:49 2004 UTC (7 years, 1 month ago) by jeff
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -2 lines
 - The regexp for the load should have been (/d+), fix this so loads over 9
   are properly represented.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Dec 26 00:13:07 2004 UTC (7 years, 1 month ago) by jeff
Branches: MAIN
 - Add 'schedgraph' a scheduler trace visualization tool written with
   python and tkinter.  Schedgraph takes input from files produces by
   ktrdump -ct when KTR_SCHED is compiled into the kernel.  The output
   represents the states of each thread with colored line segments as well
   as colored points for non-state scheduler events.  Each line segment and
   point is clickable to obtain extra detail.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options