)]}'
{
  "commit": "38516ab59fbc5b3bb278cf5e1fe2867c70cff32e",
  "tree": "904476d7780a27001281b9cb93c7959128f9a1d7",
  "parents": [
    "53da59aa6dd881fd0bbdd058a8a299d90ce9dd1d"
  ],
  "author": {
    "name": "Steven Rostedt",
    "email": "srostedt@redhat.com",
    "time": "Tue Apr 20 17:04:50 2010 -0400"
  },
  "committer": {
    "name": "Steven Rostedt",
    "email": "rostedt@goodmis.org",
    "time": "Fri May 14 09:50:34 2010 -0400"
  },
  "message": "tracing: Let tracepoints have data passed to tracepoint callbacks\n\nThis patch adds data to be passed to tracepoint callbacks.\n\nThe created functions from DECLARE_TRACE() now need a mandatory data\nparameter. For example:\n\nDECLARE_TRACE(mytracepoint, int value, value)\n\nWill create the register function:\n\nint register_trace_mytracepoint((void(*)(void *data, int value))probe,\n                                void *data);\n\nAs the first argument, all callbacks (probes) must take a (void *data)\nparameter. So a callback for the above tracepoint will look like:\n\nvoid myprobe(void *data, int value)\n{\n}\n\nThe callback may choose to ignore the data parameter.\n\nThis change allows callbacks to register a private data pointer along\nwith the function probe.\n\n\tvoid mycallback(void *data, int value);\n\n\tregister_trace_mytracepoint(mycallback, mydata);\n\nThen the mycallback() will receive the \"mydata\" as the first parameter\nbefore the args.\n\nA more detailed example:\n\n  DECLARE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));\n\n  /* In the C file */\n\n  DEFINE_TRACE(mytracepoint, TP_PROTO(int status), TP_ARGS(status));\n\n  [...]\n\n       trace_mytracepoint(status);\n\n  /* In a file registering this tracepoint */\n\n  int my_callback(void *data, int status)\n  {\n\tstruct my_struct my_data \u003d data;\n\t[...]\n  }\n\n  [...]\n\tmy_data \u003d kmalloc(sizeof(*my_data), GFP_KERNEL);\n\tinit_my_data(my_data);\n\tregister_trace_mytracepoint(my_callback, my_data);\n\nThe same callback can also be registered to the same tracepoint as long\nas the data registered is different. Note, the data must also be used\nto unregister the callback:\n\n\tunregister_trace_mytracepoint(my_callback, my_data);\n\nBecause of the data parameter, tracepoints declared this way can not have\nno args. That is:\n\n  DECLARE_TRACE(mytracepoint, TP_PROTO(void), TP_ARGS());\n\nwill cause an error.\n\nIf no arguments are needed, a new macro can be used instead:\n\n  DECLARE_TRACE_NOARGS(mytracepoint);\n\nSince there are no arguments, the proto and args fields are left out.\n\nThis is part of a series to make the tracepoint footprint smaller:\n\n   text\t   data\t    bss\t    dec\t    hex\tfilename\n4913961\t1088356\t 861512\t6863829\t 68bbd5\tvmlinux.orig\n4914025\t1088868\t 861512\t6864405\t 68be15\tvmlinux.class\n4918492\t1084612\t 861512\t6864616\t 68bee8\tvmlinux.tracepoint\n\nAgain, this patch also increases the size of the kernel, but\nlays the ground work for decreasing it.\n\n v5: Fixed net/core/drop_monitor.c to handle these updates.\n\n v4: Moved the DECLARE_TRACE() DECLARE_TRACE_NOARGS out of the\n     #ifdef CONFIG_TRACE_POINTS, since the two are the same in both\n     cases. The __DECLARE_TRACE() is what changes.\n     Thanks to Frederic Weisbecker for pointing this out.\n\n v3: Made all register_* functions require data to be passed and\n     all callbacks to take a void * parameter as its first argument.\n     This makes the calling functions comply with C standards.\n\n     Also added more comments to the modifications of DECLARE_TRACE().\n\n v2: Made the DECLARE_TRACE() have the ability to pass arguments\n     and added a new DECLARE_TRACE_NOARGS() for tracepoints that\n     do not need any arguments.\n\nAcked-by: Mathieu Desnoyers \u003cmathieu.desnoyers@efficios.com\u003e\nAcked-by: Masami Hiramatsu \u003cmhiramat@redhat.com\u003e\nAcked-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: Neil Horman \u003cnhorman@tuxdriver.com\u003e\nCc: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Steven Rostedt \u003crostedt@goodmis.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8d5e4f6d96d0596c47ba2c90a844e1a3ff02c158",
      "old_mode": 33188,
      "old_path": "include/linux/tracepoint.h",
      "new_id": "9a59d1f98cd4114948129d8e9ad95b77da27ec6d",
      "new_mode": 33188,
      "new_path": "include/linux/tracepoint.h"
    },
    {
      "type": "modify",
      "old_id": "7dcdfd824aab62c36e33bbf0bf05adbab1626a3e",
      "old_mode": 33188,
      "old_path": "include/trace/ftrace.h",
      "new_id": "ba28b644f41bd0d9757efc920a8df576552aa500",
      "new_mode": 33188,
      "new_path": "include/trace/ftrace.h"
    },
    {
      "type": "modify",
      "old_id": "b3bc91a3f510d089d7ce69ad4b294655dce53ac7",
      "old_mode": 33188,
      "old_path": "kernel/trace/blktrace.c",
      "new_id": "19d93f83e3c3605d96c1c00e90a58f3ce1835f90",
      "new_mode": 33188,
      "new_path": "kernel/trace/blktrace.c"
    },
    {
      "type": "modify",
      "old_id": "32837e19e3bdb66535650af0ba8e3597d48a11e8",
      "old_mode": 33188,
      "old_path": "kernel/trace/ftrace.c",
      "new_id": "6d2cb14f9449083c9a2e78f507b9c1255c8e7ca2",
      "new_mode": 33188,
      "new_path": "kernel/trace/ftrace.c"
    },
    {
      "type": "modify",
      "old_id": "a91da69f153ad0c859997356d53db6548006db7c",
      "old_mode": 33188,
      "old_path": "kernel/trace/kmemtrace.c",
      "new_id": "7253d0c1c32f1cafceb5752c12a912169d9a7973",
      "new_mode": 33188,
      "new_path": "kernel/trace/kmemtrace.c"
    },
    {
      "type": "modify",
      "old_id": "a55fccfede5d34b92b1d25d43b0080d8d45583bf",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_sched_switch.c",
      "new_id": "8f758d070c43777d96fb85515d3161c1eae1c63e",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_sched_switch.c"
    },
    {
      "type": "modify",
      "old_id": "8052446ceeaa9333ae575edf6f762b665c76ac09",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_sched_wakeup.c",
      "new_id": "0e73bc2ef8c55a0b8a47ffe19d7b1aad3577de2b",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_sched_wakeup.c"
    },
    {
      "type": "modify",
      "old_id": "d036a74a64f3364de1eae59191d8fdecfe4316d8",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_syscalls.c",
      "new_id": "b8d30e7ecd05076479ff585cccc6499e64397c88",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_syscalls.c"
    },
    {
      "type": "modify",
      "old_id": "cc2d2faa7d9e037734f1e4c11e87418c4a3a5400",
      "old_mode": 33188,
      "old_path": "kernel/trace/trace_workqueue.c",
      "new_id": "a7cc3793baf6897d2535737a52322552040d2737",
      "new_mode": 33188,
      "new_path": "kernel/trace/trace_workqueue.c"
    },
    {
      "type": "modify",
      "old_id": "cc89be5bc0f8ef3d8776ed0da0cf021cf6a35003",
      "old_mode": 33188,
      "old_path": "kernel/tracepoint.c",
      "new_id": "c77f3eceea250e49b0ff001959f8df9eeb8e0716",
      "new_mode": 33188,
      "new_path": "kernel/tracepoint.c"
    },
    {
      "type": "modify",
      "old_id": "cf208d8042b198d962a8ccfbd81c0b70acca28c2",
      "old_mode": 33188,
      "old_path": "net/core/drop_monitor.c",
      "new_id": "ad41529fb60f766ad095de5c40b9d537473314f1",
      "new_mode": 33188,
      "new_path": "net/core/drop_monitor.c"
    },
    {
      "type": "modify",
      "old_id": "dffdc49878af6532104307430155f4aeb44bf538",
      "old_mode": 33188,
      "old_path": "samples/tracepoints/tp-samples-trace.h",
      "new_id": "4d46be965961fd4f2f6d745243f38b87a43dfd51",
      "new_mode": 33188,
      "new_path": "samples/tracepoints/tp-samples-trace.h"
    },
    {
      "type": "modify",
      "old_id": "9e60eb6ca2d8a691f4c01adc3592be40eb7e5824",
      "old_mode": 33188,
      "old_path": "samples/tracepoints/tracepoint-probe-sample.c",
      "new_id": "744c0b9652a7815407b95ecbb8ca6553c5e900c0",
      "new_mode": 33188,
      "new_path": "samples/tracepoints/tracepoint-probe-sample.c"
    },
    {
      "type": "modify",
      "old_id": "be2a960573f174991fe26c4ccdfd5794bc61c988",
      "old_mode": 33188,
      "old_path": "samples/tracepoints/tracepoint-probe-sample2.c",
      "new_id": "9fcf990e5d4bd01c7095471105b2260028be1919",
      "new_mode": 33188,
      "new_path": "samples/tracepoints/tracepoint-probe-sample2.c"
    }
  ]
}
