Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 048cb83a authored by Primiano Tucci's avatar Primiano Tucci Committed by Gerrit Code Review
Browse files

Merge changes I50a2bc22,I9a97bf27,Id187e448,I572a5cf8,I389c3ab5, ...

* changes:
  atrace: only start trace when starting trace
  Add SDE tracing to gfx category
  Add clk tracing to freq category
  Trace clock_enable and clock_disable events.
  atrace: preempt and irq disable section tracing
  Add tracing tags to vibrator
parents 1812ea7c 5b73b747
Loading
Loading
Loading
Loading
+19 −2
Original line number Original line Diff line number Diff line
@@ -93,6 +93,7 @@ struct TracingCategory {
static const TracingCategory k_categories[] = {
static const TracingCategory k_categories[] = {
    { "gfx",        "Graphics",         ATRACE_TAG_GRAPHICS, {
    { "gfx",        "Graphics",         ATRACE_TAG_GRAPHICS, {
        { OPT,      "events/mdss/enable" },
        { OPT,      "events/mdss/enable" },
        { OPT,      "events/sde/enable" },
    } },
    } },
    { "input",      "Input",            ATRACE_TAG_INPUT, { } },
    { "input",      "Input",            ATRACE_TAG_INPUT, { } },
    { "view",       "View System",      ATRACE_TAG_VIEW, { } },
    { "view",       "View System",      ATRACE_TAG_VIEW, { } },
@@ -115,6 +116,7 @@ static const TracingCategory k_categories[] = {
    { "database",   "Database",         ATRACE_TAG_DATABASE, { } },
    { "database",   "Database",         ATRACE_TAG_DATABASE, { } },
    { "network",    "Network",          ATRACE_TAG_NETWORK, { } },
    { "network",    "Network",          ATRACE_TAG_NETWORK, { } },
    { "adb",        "ADB",              ATRACE_TAG_ADB, { } },
    { "adb",        "ADB",              ATRACE_TAG_ADB, { } },
    { "vibrator",   "Vibrator",         ATRACE_TAG_VIBRATOR, {}},
    { k_coreServiceCategory, "Core services", 0, { } },
    { k_coreServiceCategory, "Core services", 0, { } },
    { k_pdxServiceCategory, "PDX services", 0, { } },
    { k_pdxServiceCategory, "PDX services", 0, { } },
    { "sched",      "CPU Scheduling",   0, {
    { "sched",      "CPU Scheduling",   0, {
@@ -129,6 +131,14 @@ static const TracingCategory k_categories[] = {
        { REQ,      "events/irq/enable" },
        { REQ,      "events/irq/enable" },
        { OPT,      "events/ipi/enable" },
        { OPT,      "events/ipi/enable" },
    } },
    } },
    { "irqoff",     "IRQ-disabled code section tracing", 0, {
        { REQ,      "events/preemptirq/irq_enable/enable" },
        { REQ,      "events/preemptirq/irq_disable/enable" },
    } },
    { "preemptoff", "Preempt-disabled code section tracing", 0, {
        { REQ,      "events/preemptirq/preempt_enable/enable" },
        { REQ,      "events/preemptirq/preempt_disable/enable" },
    } },
    { "i2c",        "I2C Events",   0, {
    { "i2c",        "I2C Events",   0, {
        { REQ,      "events/i2c/enable" },
        { REQ,      "events/i2c/enable" },
        { REQ,      "events/i2c/i2c_read/enable" },
        { REQ,      "events/i2c/i2c_read/enable" },
@@ -143,6 +153,11 @@ static const TracingCategory k_categories[] = {
    { "freq",       "CPU Frequency",    0, {
    { "freq",       "CPU Frequency",    0, {
        { REQ,      "events/power/cpu_frequency/enable" },
        { REQ,      "events/power/cpu_frequency/enable" },
        { OPT,      "events/power/clock_set_rate/enable" },
        { OPT,      "events/power/clock_set_rate/enable" },
        { OPT,      "events/power/clock_disable/enable" },
        { OPT,      "events/power/clock_enable/enable" },
        { OPT,      "events/clk/clk_set_rate/enable" },
        { OPT,      "events/clk/clk_disable/enable" },
        { OPT,      "events/clk/clk_enable/enable" },
        { OPT,      "events/power/cpu_frequency_limits/enable" },
        { OPT,      "events/power/cpu_frequency_limits/enable" },
    } },
    } },
    { "membus",     "Memory Bus Utilization", 0, {
    { "membus",     "Memory Bus Utilization", 0, {
@@ -1206,8 +1221,10 @@ int main(int argc, char **argv)
    }
    }


    bool ok = true;
    bool ok = true;
    if (traceStart) {
        ok &= setUpTrace();
        ok &= setUpTrace();
        ok &= startTrace();
        ok &= startTrace();
    }


    if (ok && traceStart) {
    if (ok && traceStart) {
        if (!traceStream) {
        if (!traceStream) {