)]}'
{
  "commit": "7ce7e4249921d5073e764f7ff7ad83cfa9894bd7",
  "tree": "d8a3026e85d3230ce39ca99f446abe76a710c337",
  "parents": [
    "2d622719f1572ef31e0616444a515eba3094d050"
  ],
  "author": {
    "name": "Tom Zanussi",
    "email": "tzanussi@gmail.com",
    "time": "Sun Mar 22 03:31:04 2009 -0500"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Sun Mar 22 18:38:46 2009 +0100"
  },
  "message": "tracing: add per-event filtering\n\nThis patch adds per-event filtering to the event tracing subsystem.\n\nIt adds a \u0027filter\u0027 debugfs file to each event directory.  This file can\nbe written to to set filters; reading from it will display the current\nset of filters set for that event.\n\nBasically, any field listed in the \u0027format\u0027 file for an event can be\nfiltered on (including strings, but not yet other array types) using\neither matching (\u0027\u003d\u003d\u0027) or non-matching (\u0027!\u003d\u0027) \u0027predicates\u0027.  A\n\u0027predicate\u0027 can be either a single expression:\n\n # echo pid !\u003d 0 \u003e filter\n\n # cat filter\n pid !\u003d 0\n\nor a compound expression of up to 8 sub-expressions combined using \u0027\u0026\u0026\u0027\nor \u0027||\u0027:\n\n # echo comm \u003d\u003d Xorg \u003e filter\n # echo \"\u0026\u0026 sig !\u003d 29\" \u003e filter\n\n # cat filter\n comm \u003d\u003d Xorg\n \u0026\u0026 sig !\u003d 29\n\nOnly events having field values matching an expression will be available\nin the trace output; non-matching events are discarded.\n\nNote that a compound expression is built up by echoing each\nsub-expression separately - it\u0027s not the most efficient way to do\nthings, but it keeps the parser simple and assumes that compound\nexpressions will be relatively uncommon.  In any case, a subsequent\npatch introducing a way to set filters for entire subsystems should\nmitigate any need to do this for lots of events.\n\nSetting a filter without an \u0027\u0026\u0026\u0027 or \u0027||\u0027 clears the previous filter\ncompletely and sets the filter to the new expression:\n\n # cat filter\n comm \u003d\u003d Xorg\n \u0026\u0026 sig !\u003d 29\n\n # echo comm !\u003d Xorg\n\n # cat filter\n comm !\u003d Xorg\n\nTo clear a filter, echo 0 to the filter file:\n\n # echo 0 \u003e filter\n # cat filter\n none\n\nThe limit of 8 predicates for a compound expression is arbitrary - for\nefficiency, it\u0027s implemented as an array of pointers to predicates, and\n8 seemed more than enough for any filter...\n\nSigned-off-by: Tom Zanussi \u003ctzanussi@gmail.com\u003e\nAcked-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nLKML-Reference: \u003c1237710665.7703.48.camel@charm-linux\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0e45c206c2f9f942f1e5119ae09827970a0025e0",
      "old_mode": 33188,
      "old_path": "kernel/trace/Makefile",
      "new_id": "2630f5121ec12467a4b05958670aac40f357dcb8",
      "new_mode": 33188,
      "new_path": "kernel/trace/Makefile"
    },
    {
      "type": "modify",
      "old_id": "9288dc7ad14fe6613ff4d7b4ff42aab4fb10b2ec",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace.h",
      "new_id": "d9eb39e4bb38b7cd127b2242ae4533fa3279659b",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace.h"
    },
    {
      "type": "modify",
      "old_id": "961b057da28b000213f31d69c562fb0c366423ff",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_events.c",
      "new_id": "97470c48956ecf3d6a79effaebf45a359710e2ca",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_events.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8e8c5fa25be91c8e384525b9239043d575104714",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_events_filter.c"
    },
    {
      "type": "modify",
      "old_id": "468938f701415833bed694dff35b0fd26339aea7",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_events_stage_3.h",
      "new_id": "ebf215e87d5e41d2a17d0875045aa3b2f0c37f70",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_events_stage_3.h"
    }
  ]
}
