<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>
--- /dev/null
+<?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>
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,
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,
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,
GQuark *syscall_names;
GQuark *trap_names;
GQuark *irq_names;
+ GQuark *soft_irq_names;
} LttvNameTables;
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);
}
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;
}
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);
}
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)
{
/* 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,
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);
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");
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");
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");
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,
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,
LTT_FIELD_PID,
LTT_FIELD_NAME;
-extern GQuark LTT_EVENT_SYSCALL_ENTRY;
-
typedef struct _LttvTracesetState LttvTracesetState;
typedef struct _LttvTracesetStateClass LttvTracesetStateClass;
LTTV_STATE_SYSCALL,
LTTV_STATE_TRAP,
LTTV_STATE_IRQ,
+ LTTV_STATE_SOFT_IRQ,
LTTV_STATE_MODE_UNKNOWN;
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 */
return FALSE;
}
-
gboolean after_irq_entry(void *hook_data, void *call_data)
{
update_event_tree((LttvTracefileStats *)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;
/* 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,
&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,
&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);
{ 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 */
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 */
&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,
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,
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);
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,
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,
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,
0, 0, 0,
after_fs_exec_hook,
events_request,
- &g_array_index(hooks, LttvTraceHook, 12));
+ &g_array_index(hooks, LttvTraceHook, 14));
g_assert(!ret);
/* 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);
}
/* 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);
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 */
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