)]}'
{
  "commit": "9cbf117662e24c6d33245666804487f92c21b59d",
  "tree": "c4c7bed1ccb7a0a332abdc7cbf4620c98a0321cf",
  "parents": [
    "7a4f453b6d7379a7c380825949977c5a838aa012"
  ],
  "author": {
    "name": "Frederic Weisbecker",
    "email": "fweisbec@gmail.com",
    "time": "Sun Apr 19 04:51:29 2009 +0200"
  },
  "committer": {
    "name": "Ingo Molnar",
    "email": "mingo@elte.hu",
    "time": "Wed Apr 22 12:29:18 2009 +0200"
  },
  "message": "tracing/events: provide string with undefined size support\n\nThis patch provides the support for dynamic size strings on\nevent tracing.\n\nThe key concept is to use a structure with an ending char array field of\nundefined size and use such ability to allocate the minimal size on the\nring buffer to make one or more string entries fit inside, as opposite\nto a fixed length strings with upper bound.\n\nThe strings themselves are represented using fields which have an offset\nvalue from the beginning of the entry.\n\nThis patch provides three new macros:\n\n__string(item, src)\n\nThis one declares a string to the structure inside TP_STRUCT__entry.\nYou need to provide the name of the string field and the source that will\nbe copied inside.\nThis will also add the dynamic size of the string needed for the ring\nbuffer entry allocation.\nA stack allocated structure is used to temporarily store the offset\nof each strings, avoiding double calls to strlen() on each event\ninsertion.\n\n__get_str(field)\n\nThis one will give you a pointer to the string you have created. This\nis an abstract helper to resolve the absolute address given the field\nname which is a relative address from the beginning of the trace_structure.\n\n__assign_str(dst, src)\n\nUse this macro to automatically perform the string copy from src to\ndst. src must be a variable to assign and dst is the name of a __string\nfield.\n\nExample on how to use it:\n\nTRACE_EVENT(my_event,\n\tTP_PROTO(char *src1, char *src2),\n\n\tTP_ARGS(src1, src2),\n\tTP_STRUCT__entry(\n\t\t__string(str1, src1)\n\t\t__string(str2, src2)\n\t),\n\tTP_fast_assign(\n\t\t__assign_str(str1, src1);\n\t\t__assign_str(str2, src2);\n\t),\n\tTP_printk(\"%s %s\", __get_str(src1), __get_str(src2))\n)\n\nOf course you can mix-up any __field or __array inside this\nTRACE_EVENT. The position of the __string or __assign_str\ndoesn\u0027t matter.\n\nChanges in v2:\n\nAddress the suggestion of Steven Rostedt: drop the opening_string() macro\nand redefine __ending_string() to get the size of the string to be copied\ninstead of overwritting the whole ring buffer allocation.\n\nChanges in v3:\n\nAddress other suggestions of Steven Rostedt and Peter Zijlstra with\nsome changes: drop the __ending_string and the need to have only one\nstring field.\nUse offsets instead of absolute addresses.\n\n[ Impact: allow more compact memory usage for string tracing ]\n\nSigned-off-by: Frederic Weisbecker \u003cfweisbec@gmail.com\u003e\nCc: Steven Rostedt \u003crostedt@goodmis.org\u003e\nCc: Li Zefan \u003clizf@cn.fujitsu.com\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "15ef08d9add1c1a6aa5d438d4d496c8793b89ece",
      "old_mode": 33188,
      "old_path": "include/trace/ftrace.h",
      "new_id": "5a7d18c4363497022e2b28cc115620ccf58fab0a",
      "new_mode": 33188,
      "new_path": "include/trace/ftrace.h"
    }
  ]
}
