add softirq mode
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 10 Jan 2006 20:36:55 +0000 (20:36 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Tue, 10 Jan 2006 20:36:55 +0000 (20:36 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1460 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/doc/developer/lttng-lttv-roadmap.html
ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.eps
ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.png
ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.svg [new file with mode: 0644]
ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h
ltt/branches/poly/lttv/lttv/stats.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/pixmaps/lttv-color-list.png

index 6d8a45e93334e2ca4a340170c6fafb9fdc3db37a..61ff426d161e529c21aed3629ffaf28c2088e9ac 100644 (file)
@@ -16,7 +16,6 @@ The % symbol marks who is interested in the realisation of the item.<br>
 <big>LTTV Roadmap<small><br>
 <br>
 * TODO<br>
-(2) Make GUI Event list trigger state computation.<br>
 (2) state.c : add Softirq execution mode.<br>
 (3) Make LTTV aware of type formats defined in the XML file.<br>
 (3) Use a per architecture enumeration for traps.<br>
index 61d480eb8d7891b115a35c3a14a4511f392c70a8..98abddbe4b7c3eb097957c46e62f33073f00a6f7 100644 (file)
Binary files a/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.eps and b/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.eps differ
index 2fc665111db463e7255289ee01b6997ee52265a7..98abddbe4b7c3eb097957c46e62f33073f00a6f7 100644 (file)
Binary files a/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.png and b/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.png differ
diff --git a/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.svg b/ltt/branches/poly/doc/user/user_guide/docbook/lttv-color-list.svg
new file mode 100644 (file)
index 0000000..4428218
--- /dev/null
@@ -0,0 +1,377 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="210mm"
+   height="297mm"
+   id="svg1"
+   sodipodi:version="0.32"
+   inkscape:version="0.43"
+   sodipodi:docname="lttv-color-list.svg"
+   sodipodi:docbase="/home/compudj"
+   inkscape:export-filename="lttv-color-list.eps"
+   inkscape:export-xdpi="72.000000"
+   inkscape:export-ydpi="72.000000">
+  <defs
+     id="defs3">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3046">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3047" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3048" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2417">
+      <stop
+         style="stop-color:#000000;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop2418" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop2419" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient1683">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop1684" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop1685" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1686"
+       gradientTransform="matrix(8.209048,0.000000,0.000000,9.472844e-2,-109.2829,108.5418)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1723"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-108.6852,346.3422)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1725"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-108.6852,316.2141)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1727"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-108.6851,286.0859)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1729"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-108.6851,255.9577)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1731"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0.000000,0.000000,9.472844e-2,-109.2829,198.9264)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1733"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0.000000,0.000000,9.472844e-2,-109.2829,168.7982)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1735"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0.000000,0.000000,9.472844e-2,-109.2829,138.6700)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1738"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-108.6852,376.4704)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3046"
+       id="radialGradient3050"
+       gradientTransform="matrix(3.134277,0.000000,0.000000,0.248105,-112.3747,22.81742)"
+       cx="111.55042"
+       cy="699.38416"
+       fx="112.05622"
+       fy="705.04535"
+       r="124.54283"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1683"
+       id="linearGradient1360"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.209048,0,0,9.472844e-2,-109.1859,228.2326)"
+       x1="13.768714"
+       y1="1253.7403"
+       x2="69.307787"
+       y2="1253.7403" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.6726631"
+     inkscape:cx="259.33514"
+     inkscape:cy="715.93966"
+     inkscape:current-layer="layer1"
+     inkscape:window-width="1123"
+     inkscape:window-height="900"
+     inkscape:window-x="32"
+     inkscape:window-y="32"
+     showgrid="false"
+     inkscape:grid-bbox="false" />
+  <metadata
+     id="metadata4">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       style="fill:url(#linearGradient1686);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#00ff00;stroke-width:5.4563475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.5744788,227.30679 C 456.83872,227.30679 456.83872,227.30679 456.83872,227.30679"
+       id="path1061" />
+    <rect
+       style="fill:url(#radialGradient3050);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.0000000;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       id="rect1794"
+       width="455.66577"
+       height="31.256752"
+       x="3.8737080"
+       y="182.11452"
+       ry="0.0000000" />
+    <path
+       style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:5.4563475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.5744788,197.17861 C 456.83872,197.17861 456.83872,197.17861 456.83872,197.17861"
+       id="path1093" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.000000;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       x="76.297043"
+       y="183.58356"
+       id="text1719"
+       transform="matrix(0.914554,0.000000,0.000000,0.850284,393.4446,45.59173)"><tspan
+         sodipodi:role="line"
+         id="tspan1720"
+         x="76.297043"
+         y="183.58356">White : mode unknown or unnamed</tspan></text>
+    <path
+       style="fill:url(#linearGradient1723);fill-opacity:1;fill-rule:evenodd;stroke:#076400;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 7.1723278,465.10727 C 457.43657,465.10727 457.43657,465.10727 457.43657,465.10727"
+       id="path1722" />
+    <path
+       style="fill:url(#linearGradient1725);fill-opacity:1;fill-rule:evenodd;stroke:#64005d;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 7.1723278,434.97909 C 457.43657,434.97909 457.43657,434.97909 457.43657,434.97909"
+       id="path1724" />
+    <path
+       style="fill:url(#linearGradient1727);fill-opacity:1;fill-rule:evenodd;stroke:#777700;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 7.1723278,404.85091 C 457.43657,404.85091 457.43657,404.85091 457.43657,404.85091"
+       id="path1726" />
+    <path
+       style="fill:url(#linearGradient1729);fill-opacity:1;fill-rule:evenodd;stroke:#660000;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 7.1723278,374.72273 C 457.43657,374.72273 457.43657,374.72273 457.43657,374.72273"
+       id="path1728" />
+    <path
+       style="fill:url(#linearGradient1731);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ff5e00;stroke-width:5.4563475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.5744788,317.69134 C 456.83872,317.69134 456.83872,317.69134 456.83872,317.69134"
+       id="path1730" />
+    <path
+       style="fill:url(#linearGradient1733);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffff01;stroke-width:5.4563475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.5744788,287.56315 C 456.83872,287.56315 456.83872,287.56315 456.83872,287.56315"
+       id="path1732" />
+    <path
+       style="fill:url(#linearGradient1735);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#019eff;stroke-width:5.4563475;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+       d="M 6.5744788,257.43497 C 456.83872,257.43497 456.83872,257.43497 456.83872,257.43497"
+       id="path1734" />
+    <path
+       style="fill:url(#linearGradient1738);fill-opacity:1;fill-rule:evenodd;stroke:#890084;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 7.1723278,495.23545 C 457.43657,495.23545 457.43657,495.23545 457.43657,495.23545"
+       id="path1737" />
+    <text
+       xml:space="preserve"
+       style="font-size:12.000000;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       x="76.297043"
+       y="183.58356"
+       id="text1764"
+       transform="matrix(0.914554,0.000000,0.000000,0.850284,393.8303,135.9762)"><tspan
+         sodipodi:role="line"
+         id="tspan1765"
+         x="76.297043"
+         y="183.58356">Yellow : running in a trap</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12.000000;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       x="76.297043"
+       y="183.58356"
+       id="text1767"
+       transform="matrix(0.914554,0.000000,0.000000,0.850284,393.1927,166.1044)"><tspan
+         sodipodi:role="line"
+         id="tspan1768"
+         x="76.297043"
+         y="183.58356">Orange : servicing an IRQ</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.53879"
+       y="424.55148"
+       id="text1773"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1774"
+         x="446.53879"
+         y="424.55148">Dark yellow : waiting for CPU</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.53879"
+       y="455.79773"
+       id="text1776"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1777"
+         x="446.53879"
+         y="455.79773">Dark purple : zombie</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.53879"
+       y="487.04382"
+       id="text1779"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1780"
+         x="446.53879"
+         y="487.04382">Dark green : waiting for fork</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.53879"
+       y="518.28979"
+       id="text1782"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1783"
+         x="446.53879"
+         y="518.28979">Magenta : process has exited</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12.000000;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       x="76.297043"
+       y="183.58356"
+       id="text1785"
+       transform="matrix(0.914554,0.000000,0.000000,0.850284,392.7318,105.8481)"><tspan
+         sodipodi:role="line"
+         id="tspan1786"
+         x="76.297043"
+         y="183.58356">Pale blue : running in a system call</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:12.000000;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Bitstream Vera Sans"
+       x="76.297043"
+       y="183.58356"
+       id="text1788"
+       transform="matrix(0.914554,0.000000,0.000000,0.850284,393.1927,75.71992)"><tspan
+         sodipodi:role="line"
+         id="tspan1789"
+         x="76.297043"
+         y="183.58356">Green : running in user mode</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.53876"
+       y="391.25418"
+       id="text1791"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1792"
+         x="446.53876"
+         y="391.25418">Dark red : waiting for I/O</tspan></text>
+    <path
+       style="fill:url(#linearGradient1360);fill-opacity:1;fill-rule:evenodd;stroke:#ff5e60;stroke-width:5.45634747;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+       d="M 6.6715565,346.99756 C 456.9358,346.99756 456.9358,346.99756 456.9358,346.99756"
+       id="path1354" />
+    <text
+       xml:space="preserve"
+       style="font-size:10.58200741px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans"
+       x="446.50031"
+       y="364.55157"
+       id="text1356"
+       transform="scale(1.037105,0.964223)"><tspan
+         sodipodi:role="line"
+         id="tspan1358"
+         x="446.50031"
+         y="364.55157">Pink : running a softirq handler</tspan></text>
+  </g>
+</svg>
index 18d21fde159688115236bc06360ee53a645a2ff4..18518e87f557fcb5636df6c17fdf9c6c65a3051d 100644 (file)
@@ -48,6 +48,8 @@ GQuark
     LTT_EVENT_TRAP_EXIT,
     LTT_EVENT_IRQ_ENTRY,
     LTT_EVENT_IRQ_EXIT,
+    LTT_EVENT_SOFT_IRQ_ENTRY,
+    LTT_EVENT_SOFT_IRQ_EXIT,
     LTT_EVENT_SCHEDCHANGE,
     LTT_EVENT_FORK,
     LTT_EVENT_EXIT,
@@ -60,6 +62,7 @@ GQuark
     LTT_FIELD_SYSCALL_ID,
     LTT_FIELD_TRAP_ID,
     LTT_FIELD_IRQ_ID,
+    LTT_FIELD_SOFT_IRQ_ID,
     LTT_FIELD_OUT,
     LTT_FIELD_IN,
     LTT_FIELD_OUT_STATE,
@@ -73,7 +76,8 @@ LttvExecutionMode
   LTTV_STATE_USER_MODE,
   LTTV_STATE_SYSCALL,
   LTTV_STATE_TRAP,
-  LTTV_STATE_IRQ;
+  LTTV_STATE_IRQ,
+  LTTV_STATE_SOFT_IRQ;
 
 LttvExecutionSubmode
   LTTV_STATE_SUBMODE_UNKNOWN,
@@ -728,6 +732,7 @@ typedef struct _LttvNameTables {
   GQuark *syscall_names;
   GQuark *trap_names;
   GQuark *irq_names;
+  GQuark *soft_irq_names;
 } LttvNameTables;
 
 
@@ -846,6 +851,20 @@ create_name_tables(LttvTraceState *tcs)
     name_tables->irq_names[i] = g_quark_from_string(fe_name->str);
   }
 
+  /*
+  name_tables->soft_irq_names = g_new(GQuark, nb);
+  for(i = 0 ; i < nb ; i++) {
+    name_tables->soft_irq_names[i] = g_quark_from_string(ltt_enum_string_get(t, i));
+  }
+  */
+
+  name_tables->soft_irq_names = g_new(GQuark, 256);
+  for(i = 0 ; i < 256 ; i++) {
+    g_string_printf(fe_name, "softirq %d", i);
+    name_tables->soft_irq_names[i] = g_quark_from_string(fe_name->str);
+  }
+
+
   g_string_free(fe_name, TRUE);
 }
 
@@ -865,6 +884,7 @@ get_name_tables(LttvTraceState *tcs)
   tcs->syscall_names = name_tables->syscall_names;
   tcs->trap_names = name_tables->trap_names;
   tcs->irq_names = name_tables->irq_names;
+  tcs->soft_irq_names = name_tables->soft_irq_names;
 }
 
 
@@ -884,6 +904,7 @@ free_name_tables(LttvTraceState *tcs)
   g_free(name_tables->syscall_names);
   g_free(name_tables->trap_names);
   g_free(name_tables->irq_names);
+  g_free(name_tables->soft_irq_names);
   g_free(name_tables);
 } 
 
@@ -1177,6 +1198,37 @@ static gboolean irq_exit(void *hook_data, void *call_data)
   return FALSE;
 }
 
+static gboolean soft_irq_entry(void *hook_data, void *call_data)
+{
+  LttvTracefileState *s = (LttvTracefileState *)call_data;
+  LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
+  guint8 fac_id = ltt_event_facility_id(e);
+  guint8 ev_id = ltt_event_eventtype_id(e);
+  LttvTraceHookByFacility *thf = (LttvTraceHookByFacility *)hook_data;
+ // g_assert(lttv_trace_hook_get_first((LttvTraceHook *)hook_data)->f1 != NULL);
+  g_assert(thf->f1 != NULL);
+ // g_assert(thf == lttv_trace_hook_get_first((LttvTraceHook *)hook_data));
+  LttField *f = thf->f1;
+
+  LttvExecutionSubmode submode;
+
+  submode = ((LttvTraceState *)(s->parent.t_context))->soft_irq_names[
+      ltt_event_get_unsigned(e, f)];
+
+  /* Do something with the info about being in user or system mode when int? */
+  push_state(s, LTTV_STATE_SOFT_IRQ, submode);
+  return FALSE;
+}
+
+
+static gboolean soft_irq_exit(void *hook_data, void *call_data)
+{
+  LttvTracefileState *s = (LttvTracefileState *)call_data;
+
+  pop_state(s, LTTV_STATE_SOFT_IRQ);
+  return FALSE;
+}
+
 
 static gboolean schedchange(void *hook_data, void *call_data)
 {
@@ -1431,8 +1483,8 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
     /* Find the eventtype id for the following events and register the
        associated by id hooks. */
 
-    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 11);
-    hooks = g_array_set_size(hooks, 11);
+    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 13);
+    hooks = g_array_set_size(hooks, 13);
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
@@ -1470,34 +1522,46 @@ void lttv_state_add_event_hooks(LttvTracesetState *self)
         irq_exit, NULL, &g_array_index(hooks, LttvTraceHook, 5));
     g_assert(!ret);
 
+    ret = lttv_trace_find_hook(ts->parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+        LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+        soft_irq_entry, NULL, &g_array_index(hooks, LttvTraceHook, 6));
+    g_assert(!ret);
+
+    ret = lttv_trace_find_hook(ts->parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+        0, 0, 0, 
+        soft_irq_exit, NULL, &g_array_index(hooks, LttvTraceHook, 7));
+    g_assert(!ret);
+
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_SCHEDCHANGE,
         LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
-        schedchange, NULL, &g_array_index(hooks, LttvTraceHook, 6));
+        schedchange, NULL, &g_array_index(hooks, LttvTraceHook, 8));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_FORK,
         LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
-        process_fork, NULL, &g_array_index(hooks, LttvTraceHook, 7));
+        process_fork, NULL, &g_array_index(hooks, LttvTraceHook, 9));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_EXIT,
         LTT_FIELD_PID, 0, 0,
-        process_exit, NULL, &g_array_index(hooks, LttvTraceHook, 8));
+        process_exit, NULL, &g_array_index(hooks, LttvTraceHook, 10));
     g_assert(!ret);
     
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_FREE,
         LTT_FIELD_PID, 0, 0,
-        process_free, NULL, &g_array_index(hooks, LttvTraceHook, 9));
+        process_free, NULL, &g_array_index(hooks, LttvTraceHook, 11));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.t,
         LTT_FACILITY_FS, LTT_EVENT_EXEC,
         LTT_FIELD_FILENAME, 0, 0,
-        process_exec, NULL, &g_array_index(hooks, LttvTraceHook, 10));
+        process_exec, NULL, &g_array_index(hooks, LttvTraceHook, 12));
     g_assert(!ret);
 
 
@@ -2130,6 +2194,7 @@ static void module_init()
   LTTV_STATE_SYSCALL = g_quark_from_string("system call");
   LTTV_STATE_TRAP = g_quark_from_string("trap");
   LTTV_STATE_IRQ = g_quark_from_string("irq");
+  LTTV_STATE_SOFT_IRQ = g_quark_from_string("softirq");
   LTTV_STATE_SUBMODE_UNKNOWN = g_quark_from_string("unknown submode");
   LTTV_STATE_SUBMODE_NONE = g_quark_from_string("(no submode)");
   LTTV_STATE_WAIT_CPU = g_quark_from_string("wait for cpu");
@@ -2164,6 +2229,8 @@ static void module_init()
   LTT_EVENT_TRAP_EXIT     = g_quark_from_string("trap_exit");
   LTT_EVENT_IRQ_ENTRY     = g_quark_from_string("irq_entry");
   LTT_EVENT_IRQ_EXIT      = g_quark_from_string("irq_exit");
+  LTT_EVENT_SOFT_IRQ_ENTRY     = g_quark_from_string("soft_irq_entry");
+  LTT_EVENT_SOFT_IRQ_EXIT      = g_quark_from_string("soft_irq_exit");
   LTT_EVENT_SCHEDCHANGE   = g_quark_from_string("schedchange");
   LTT_EVENT_FORK          = g_quark_from_string("fork");
   LTT_EVENT_EXIT          = g_quark_from_string("exit");
@@ -2174,6 +2241,7 @@ static void module_init()
   LTT_FIELD_SYSCALL_ID    = g_quark_from_string("syscall_id");
   LTT_FIELD_TRAP_ID       = g_quark_from_string("trap_id");
   LTT_FIELD_IRQ_ID        = g_quark_from_string("irq_id");
+  LTT_FIELD_SOFT_IRQ_ID        = g_quark_from_string("softirq_id");
   LTT_FIELD_OUT           = g_quark_from_string("out");
   LTT_FIELD_IN            = g_quark_from_string("in");
   LTT_FIELD_OUT_STATE     = g_quark_from_string("out_state");
index de8d36b8a8557669290e9bf4bb90ee89a7b018f6..bf6ad5315666de94ad53110557f5dc1b0a5705e3 100644 (file)
@@ -70,6 +70,8 @@ extern GQuark
     LTT_EVENT_TRAP_EXIT,
     LTT_EVENT_IRQ_ENTRY,
     LTT_EVENT_IRQ_EXIT,
+    LTT_EVENT_SOFT_IRQ_ENTRY,
+    LTT_EVENT_SOFT_IRQ_EXIT,
     LTT_EVENT_SCHEDCHANGE,
     LTT_EVENT_FORK,
     LTT_EVENT_EXIT,
@@ -82,6 +84,7 @@ extern GQuark
     LTT_FIELD_SYSCALL_ID,
     LTT_FIELD_TRAP_ID,
     LTT_FIELD_IRQ_ID,
+    LTT_FIELD_SOFT_IRQ_ID,
     LTT_FIELD_OUT,
     LTT_FIELD_IN,
     LTT_FIELD_OUT_STATE,
@@ -90,8 +93,6 @@ extern GQuark
     LTT_FIELD_PID,
     LTT_FIELD_NAME;
 
-extern GQuark LTT_EVENT_SYSCALL_ENTRY;
-
 typedef struct _LttvTracesetState LttvTracesetState;
 typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
 
@@ -141,6 +142,7 @@ extern LttvExecutionMode
   LTTV_STATE_SYSCALL,
   LTTV_STATE_TRAP,
   LTTV_STATE_IRQ,
+  LTTV_STATE_SOFT_IRQ,
   LTTV_STATE_MODE_UNKNOWN;
 
 
@@ -255,6 +257,7 @@ struct _LttvTraceState {
   GQuark *syscall_names;
   GQuark *trap_names;
   GQuark *irq_names;
+  GQuark *soft_irq_names;
   LttTime *max_time_state_recomputed_in_seek;
 
   /* Array of per cpu running process */
index 23a9cca8481b0848f17bc0855fdc068d4be3aa73..143c14e276300b9264dacd03e7b662b05bc4adfa 100644 (file)
@@ -530,7 +530,6 @@ gboolean before_irq_entry(void *hook_data, void *call_data)
   return FALSE;
 }
 
-
 gboolean after_irq_entry(void *hook_data, void *call_data)
 {
   update_event_tree((LttvTracefileStats *)call_data);
@@ -552,6 +551,33 @@ gboolean after_irq_exit(void *hook_data, void *call_data)
 }
 
 
+gboolean before_soft_irq_entry(void *hook_data, void *call_data)
+{
+  mode_change((LttvTracefileStats *)call_data);
+  return FALSE;
+}
+
+gboolean after_soft_irq_entry(void *hook_data, void *call_data)
+{
+  update_event_tree((LttvTracefileStats *)call_data);
+  return FALSE;
+}
+
+
+gboolean before_soft_irq_exit(void *hook_data, void *call_data)
+{
+  mode_end((LttvTracefileStats *)call_data);
+  return FALSE;
+}
+
+
+gboolean after_soft_irq_exit(void *hook_data, void *call_data)
+{
+  update_event_tree((LttvTracefileStats *)call_data);
+  return FALSE;
+}
+
+
 gboolean before_schedchange(void *hook_data, void *call_data)
 {
   LttvTracefileStats *tfcs = (LttvTracefileStats *)call_data;
@@ -804,8 +830,8 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
     /* Find the eventtype id for the following events and register the
        associated by id hooks. */
 
-    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 7);
-    g_array_set_size(hooks, 7);
+    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 9);
+    g_array_set_size(hooks, 9);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
@@ -849,17 +875,31 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
         &g_array_index(hooks, LttvTraceHook, 5));
     g_assert(!ret);
 
+    ret = lttv_trace_find_hook(ts->parent.parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+        LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+        before_soft_irq_entry, NULL,
+        &g_array_index(hooks, LttvTraceHook, 6));
+    g_assert(!ret);
+
+    ret = lttv_trace_find_hook(ts->parent.parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+        0, 0, 0,
+        before_soft_irq_exit, NULL,
+        &g_array_index(hooks, LttvTraceHook, 7));
+    g_assert(!ret);
+
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_SCHEDCHANGE,
         LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
         before_schedchange, NULL, 
-        &g_array_index(hooks, LttvTraceHook, 6));
+        &g_array_index(hooks, LttvTraceHook, 8));
     g_assert(!ret);
 
     before_hooks = hooks;
 
-    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 9);
-    g_array_set_size(hooks, 9);
+    hooks = g_array_sized_new(FALSE, FALSE, sizeof(LttvTraceHook), 11);
+    g_array_set_size(hooks, 11);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_KERNEL_ARCH, LTT_EVENT_SYSCALL_ENTRY,
@@ -903,26 +943,39 @@ void lttv_stats_add_event_hooks(LttvTracesetStats *self)
         &g_array_index(hooks, LttvTraceHook, 5));
     g_assert(!ret);
 
+    ret = lttv_trace_find_hook(ts->parent.parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY, 
+        LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+        after_irq_entry, NULL,
+        &g_array_index(hooks, LttvTraceHook, 6));
+    g_assert(!ret);
+
+    ret = lttv_trace_find_hook(ts->parent.parent.t,
+        LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+        0, 0, 0,
+        after_soft_irq_exit, NULL,
+        &g_array_index(hooks, LttvTraceHook, 7));
+    g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_FORK, 
         LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
         process_fork, NULL, 
-        &g_array_index(hooks, LttvTraceHook, 6));
+        &g_array_index(hooks, LttvTraceHook, 8));
     g_assert(!ret);
 
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_EXIT,
         LTT_FIELD_PID, 0, 0,
         process_exit, NULL,
-        &g_array_index(hooks, LttvTraceHook, 7));
+        &g_array_index(hooks, LttvTraceHook, 9));
     g_assert(!ret);
     
     ret = lttv_trace_find_hook(ts->parent.parent.t,
         LTT_FACILITY_PROCESS, LTT_EVENT_FREE,
         LTT_FIELD_PID, 0, 0,
         process_free, NULL,
-        &g_array_index(hooks, LttvTraceHook, 8));
+        &g_array_index(hooks, LttvTraceHook, 10));
     g_assert(!ret);
 
 
index b461e8a46c22b077cd2a5ff4a87a4568dacd39db..4fade3135f56423e42a72a0832f9ddcfd473fd0f 100644 (file)
@@ -72,7 +72,8 @@ GdkColor drawing_colors[NUM_COLORS] =
   { 0, 0x0000, 0xFF00, 0x0000 }, /* COL_RUN_USER_MODE : green */
   { 0, 0x0100, 0x9E00, 0xFFFF }, /* COL_RUN_SYSCALL : pale blue */
   { 0, 0xFF00, 0xFF00, 0x0100 }, /* COL_RUN_TRAP : yellow */
-  { 0, 0xFFFF, 0x5E00, 0x0000 }, /* COL_RUN_IRQ : red */
+  { 0, 0xFFFF, 0x5E00, 0x0000 }, /* COL_RUN_IRQ : orange */
+  { 0, 0xFFFF, 0x9400, 0x9600 }, /* COL_RUN_SOFT_IRQ : pink */
   { 0, 0x6600, 0x0000, 0x0000 }, /* COL_WAIT : dark red */
   { 0, 0x7700, 0x7700, 0x0000 }, /* COL_WAIT_CPU : dark yellow */
   { 0, 0x6400, 0x0000, 0x5D00 }, /* COL_ZOMBIE : dark purple */
@@ -219,7 +220,7 @@ void drawing_data_request(Drawing_t *drawing,
          associated by id hooks. */
 
       hooks = g_array_new(FALSE, FALSE, sizeof(LttvTraceHook));
-      hooks = g_array_set_size(hooks, 13);
+      hooks = g_array_set_size(hooks, 15);
 
       /* before hooks */
       
@@ -271,12 +272,29 @@ void drawing_data_request(Drawing_t *drawing,
           &g_array_index(hooks, LttvTraceHook, 5));
       g_assert(!ret);
 
+      ret = lttv_trace_find_hook(ts->parent.t,
+          LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_ENTRY,
+          LTT_FIELD_SOFT_IRQ_ID, 0, 0,
+          before_execmode_hook,
+          events_request,
+          &g_array_index(hooks, LttvTraceHook, 6));
+      g_assert(!ret);
+
+      ret = lttv_trace_find_hook(ts->parent.t,
+          LTT_FACILITY_KERNEL, LTT_EVENT_SOFT_IRQ_EXIT,
+          0, 0, 0, 
+          before_execmode_hook,
+          events_request,
+          &g_array_index(hooks, LttvTraceHook, 7));
+      g_assert(!ret);
+
+
       ret = lttv_trace_find_hook(ts->parent.t,
           LTT_FACILITY_PROCESS, LTT_EVENT_SCHEDCHANGE,
           LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
           before_schedchange_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 6));
+          &g_array_index(hooks, LttvTraceHook, 8));
       g_assert(!ret);
 
       ret = lttv_trace_find_hook(ts->parent.t,
@@ -284,7 +302,7 @@ void drawing_data_request(Drawing_t *drawing,
           LTT_FIELD_PID, 0, 0,
           before_process_exit_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 7));
+          &g_array_index(hooks, LttvTraceHook, 9));
       g_assert(!ret);
       
       ret = lttv_trace_find_hook(ts->parent.t,
@@ -292,7 +310,7 @@ void drawing_data_request(Drawing_t *drawing,
           LTT_FIELD_PID, 0, 0,
           before_process_release_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 8));
+          &g_array_index(hooks, LttvTraceHook, 10));
       g_assert(!ret);
 
 
@@ -350,7 +368,7 @@ void drawing_data_request(Drawing_t *drawing,
           LTT_FIELD_OUT, LTT_FIELD_IN, LTT_FIELD_OUT_STATE,
           after_schedchange_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 9));
+          &g_array_index(hooks, LttvTraceHook, 11));
       g_assert(!ret);
 
       ret = lttv_trace_find_hook(ts->parent.t,
@@ -358,7 +376,7 @@ void drawing_data_request(Drawing_t *drawing,
           LTT_FIELD_PARENT_PID, LTT_FIELD_CHILD_PID, 0,
           after_process_fork_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 10));
+          &g_array_index(hooks, LttvTraceHook, 12));
       g_assert(!ret);
 
       ret = lttv_trace_find_hook(ts->parent.t,
@@ -366,7 +384,7 @@ void drawing_data_request(Drawing_t *drawing,
           LTT_FIELD_PID, 0, 0,
           after_process_exit_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 11));
+          &g_array_index(hooks, LttvTraceHook, 13));
       g_assert(!ret);
 
       ret = lttv_trace_find_hook(ts->parent.t,
@@ -374,7 +392,7 @@ void drawing_data_request(Drawing_t *drawing,
           0, 0, 0,
           after_fs_exec_hook,
           events_request,
-          &g_array_index(hooks, LttvTraceHook, 12));
+          &g_array_index(hooks, LttvTraceHook, 14));
       g_assert(!ret);
 
 
@@ -391,7 +409,7 @@ void drawing_data_request(Drawing_t *drawing,
       
       /* Add these hooks to each event_by_id hooks list */
       /* add before */
-      for(k = 0 ; k < 9 ; k++) {
+      for(k = 0 ; k < 11 ; k++) {
         hook = &g_array_index(hooks, LttvTraceHook, k);
         for(l=0;l<hook->fac_list->len;l++) {
           thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
@@ -403,7 +421,7 @@ void drawing_data_request(Drawing_t *drawing,
       }
 
       /* add after */
-      for(k = 9 ; k < 13 ; k++) {
+      for(k = 11 ; k < 15 ; k++) {
         hook = &g_array_index(hooks, LttvTraceHook, k);
         for(l=0;l<hook->fac_list->len;l++) {
           thf = g_array_index(hook->fac_list, LttvTraceHookByFacility*, l);
index 9f2b936003bc5584d1de53073da3934e00849760..58f562a2a6380e4be299b805e68807f1aaf29365 100644 (file)
@@ -39,7 +39,8 @@ typedef enum _draw_color {
                 COL_RUN_USER_MODE,/* green */
                 COL_RUN_SYSCALL,  /* pale blue */
                 COL_RUN_TRAP,     /* yellow */
-                COL_RUN_IRQ,      /* red */
+                COL_RUN_IRQ,      /* orange */
+                COL_RUN_SOFT_IRQ, /* red */
                 COL_WAIT,         /* dark red */
                 COL_WAIT_CPU,     /* dark yellow */
                 COL_ZOMBIE,       /* dark purple */
index c2b16dfa7f7fb13a0b19d12430d89c4c07886fab..22015eafffe26e5a10d6878ff023c651847134e6 100644 (file)
@@ -279,6 +279,8 @@ static inline PropertiesLine prepare_s_e_line(LttvProcessState *process)
       prop_line.color = drawing_colors[COL_RUN_TRAP];
     else if(process->state->t == LTTV_STATE_IRQ)
       prop_line.color = drawing_colors[COL_RUN_IRQ];
+    else if(process->state->t == LTTV_STATE_SOFT_IRQ)
+      prop_line.color = drawing_colors[COL_RUN_SOFT_IRQ];
     else if(process->state->t == LTTV_STATE_MODE_UNKNOWN)
       prop_line.color = drawing_colors[COL_MODE_UNKNOWN];
     else
index 2fc665111db463e7255289ee01b6997ee52265a7..98abddbe4b7c3eb097957c46e62f33073f00a6f7 100644 (file)
Binary files a/ltt/branches/poly/lttv/modules/gui/lttvwindow/pixmaps/lttv-color-list.png and b/ltt/branches/poly/lttv/modules/gui/lttvwindow/pixmaps/lttv-color-list.png differ
This page took 0.041608 seconds and 4 git commands to generate.