ocfs2_trace.h 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM ocfs2
  3. #if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_OCFS2_H
  5. #include <linux/tracepoint.h>
  6. DECLARE_EVENT_CLASS(ocfs2__int,
  7. TP_PROTO(int num),
  8. TP_ARGS(num),
  9. TP_STRUCT__entry(
  10. __field(int, num)
  11. ),
  12. TP_fast_assign(
  13. __entry->num = num;
  14. ),
  15. TP_printk("%d", __entry->num)
  16. );
  17. #define DEFINE_OCFS2_INT_EVENT(name) \
  18. DEFINE_EVENT(ocfs2__int, name, \
  19. TP_PROTO(int num), \
  20. TP_ARGS(num))
  21. DECLARE_EVENT_CLASS(ocfs2__uint,
  22. TP_PROTO(unsigned int num),
  23. TP_ARGS(num),
  24. TP_STRUCT__entry(
  25. __field( unsigned int, num )
  26. ),
  27. TP_fast_assign(
  28. __entry->num = num;
  29. ),
  30. TP_printk("%u", __entry->num)
  31. );
  32. #define DEFINE_OCFS2_UINT_EVENT(name) \
  33. DEFINE_EVENT(ocfs2__uint, name, \
  34. TP_PROTO(unsigned int num), \
  35. TP_ARGS(num))
  36. DECLARE_EVENT_CLASS(ocfs2__ull,
  37. TP_PROTO(unsigned long long blkno),
  38. TP_ARGS(blkno),
  39. TP_STRUCT__entry(
  40. __field(unsigned long long, blkno)
  41. ),
  42. TP_fast_assign(
  43. __entry->blkno = blkno;
  44. ),
  45. TP_printk("%llu", __entry->blkno)
  46. );
  47. #define DEFINE_OCFS2_ULL_EVENT(name) \
  48. DEFINE_EVENT(ocfs2__ull, name, \
  49. TP_PROTO(unsigned long long num), \
  50. TP_ARGS(num))
  51. DECLARE_EVENT_CLASS(ocfs2__pointer,
  52. TP_PROTO(void *pointer),
  53. TP_ARGS(pointer),
  54. TP_STRUCT__entry(
  55. __field(void *, pointer)
  56. ),
  57. TP_fast_assign(
  58. __entry->pointer = pointer;
  59. ),
  60. TP_printk("%p", __entry->pointer)
  61. );
  62. #define DEFINE_OCFS2_POINTER_EVENT(name) \
  63. DEFINE_EVENT(ocfs2__pointer, name, \
  64. TP_PROTO(void *pointer), \
  65. TP_ARGS(pointer))
  66. DECLARE_EVENT_CLASS(ocfs2__string,
  67. TP_PROTO(const char *name),
  68. TP_ARGS(name),
  69. TP_STRUCT__entry(
  70. __string(name,name)
  71. ),
  72. TP_fast_assign(
  73. __assign_str(name, name);
  74. ),
  75. TP_printk("%s", __get_str(name))
  76. );
  77. #define DEFINE_OCFS2_STRING_EVENT(name) \
  78. DEFINE_EVENT(ocfs2__string, name, \
  79. TP_PROTO(const char *name), \
  80. TP_ARGS(name))
  81. DECLARE_EVENT_CLASS(ocfs2__int_int,
  82. TP_PROTO(int value1, int value2),
  83. TP_ARGS(value1, value2),
  84. TP_STRUCT__entry(
  85. __field(int, value1)
  86. __field(int, value2)
  87. ),
  88. TP_fast_assign(
  89. __entry->value1 = value1;
  90. __entry->value2 = value2;
  91. ),
  92. TP_printk("%d %d", __entry->value1, __entry->value2)
  93. );
  94. #define DEFINE_OCFS2_INT_INT_EVENT(name) \
  95. DEFINE_EVENT(ocfs2__int_int, name, \
  96. TP_PROTO(int val1, int val2), \
  97. TP_ARGS(val1, val2))
  98. DECLARE_EVENT_CLASS(ocfs2__uint_int,
  99. TP_PROTO(unsigned int value1, int value2),
  100. TP_ARGS(value1, value2),
  101. TP_STRUCT__entry(
  102. __field(unsigned int, value1)
  103. __field(int, value2)
  104. ),
  105. TP_fast_assign(
  106. __entry->value1 = value1;
  107. __entry->value2 = value2;
  108. ),
  109. TP_printk("%u %d", __entry->value1, __entry->value2)
  110. );
  111. #define DEFINE_OCFS2_UINT_INT_EVENT(name) \
  112. DEFINE_EVENT(ocfs2__uint_int, name, \
  113. TP_PROTO(unsigned int val1, int val2), \
  114. TP_ARGS(val1, val2))
  115. DECLARE_EVENT_CLASS(ocfs2__uint_uint,
  116. TP_PROTO(unsigned int value1, unsigned int value2),
  117. TP_ARGS(value1, value2),
  118. TP_STRUCT__entry(
  119. __field(unsigned int, value1)
  120. __field(unsigned int, value2)
  121. ),
  122. TP_fast_assign(
  123. __entry->value1 = value1;
  124. __entry->value2 = value2;
  125. ),
  126. TP_printk("%u %u", __entry->value1, __entry->value2)
  127. );
  128. #define DEFINE_OCFS2_UINT_UINT_EVENT(name) \
  129. DEFINE_EVENT(ocfs2__uint_uint, name, \
  130. TP_PROTO(unsigned int val1, unsigned int val2), \
  131. TP_ARGS(val1, val2))
  132. DECLARE_EVENT_CLASS(ocfs2__ull_uint,
  133. TP_PROTO(unsigned long long value1, unsigned int value2),
  134. TP_ARGS(value1, value2),
  135. TP_STRUCT__entry(
  136. __field(unsigned long long, value1)
  137. __field(unsigned int, value2)
  138. ),
  139. TP_fast_assign(
  140. __entry->value1 = value1;
  141. __entry->value2 = value2;
  142. ),
  143. TP_printk("%llu %u", __entry->value1, __entry->value2)
  144. );
  145. #define DEFINE_OCFS2_ULL_UINT_EVENT(name) \
  146. DEFINE_EVENT(ocfs2__ull_uint, name, \
  147. TP_PROTO(unsigned long long val1, unsigned int val2), \
  148. TP_ARGS(val1, val2))
  149. DECLARE_EVENT_CLASS(ocfs2__ull_int,
  150. TP_PROTO(unsigned long long value1, int value2),
  151. TP_ARGS(value1, value2),
  152. TP_STRUCT__entry(
  153. __field(unsigned long long, value1)
  154. __field(int, value2)
  155. ),
  156. TP_fast_assign(
  157. __entry->value1 = value1;
  158. __entry->value2 = value2;
  159. ),
  160. TP_printk("%llu %d", __entry->value1, __entry->value2)
  161. );
  162. #define DEFINE_OCFS2_ULL_INT_EVENT(name) \
  163. DEFINE_EVENT(ocfs2__ull_int, name, \
  164. TP_PROTO(unsigned long long val1, int val2), \
  165. TP_ARGS(val1, val2))
  166. DECLARE_EVENT_CLASS(ocfs2__ull_ull,
  167. TP_PROTO(unsigned long long value1, unsigned long long value2),
  168. TP_ARGS(value1, value2),
  169. TP_STRUCT__entry(
  170. __field(unsigned long long, value1)
  171. __field(unsigned long long, value2)
  172. ),
  173. TP_fast_assign(
  174. __entry->value1 = value1;
  175. __entry->value2 = value2;
  176. ),
  177. TP_printk("%llu %llu", __entry->value1, __entry->value2)
  178. );
  179. #define DEFINE_OCFS2_ULL_ULL_EVENT(name) \
  180. DEFINE_EVENT(ocfs2__ull_ull, name, \
  181. TP_PROTO(unsigned long long val1, unsigned long long val2), \
  182. TP_ARGS(val1, val2))
  183. DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint,
  184. TP_PROTO(unsigned long long value1,
  185. unsigned long long value2, unsigned int value3),
  186. TP_ARGS(value1, value2, value3),
  187. TP_STRUCT__entry(
  188. __field(unsigned long long, value1)
  189. __field(unsigned long long, value2)
  190. __field(unsigned int, value3)
  191. ),
  192. TP_fast_assign(
  193. __entry->value1 = value1;
  194. __entry->value2 = value2;
  195. __entry->value3 = value3;
  196. ),
  197. TP_printk("%llu %llu %u",
  198. __entry->value1, __entry->value2, __entry->value3)
  199. );
  200. #define DEFINE_OCFS2_ULL_ULL_UINT_EVENT(name) \
  201. DEFINE_EVENT(ocfs2__ull_ull_uint, name, \
  202. TP_PROTO(unsigned long long val1, \
  203. unsigned long long val2, unsigned int val3), \
  204. TP_ARGS(val1, val2, val3))
  205. DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint,
  206. TP_PROTO(unsigned long long value1,
  207. unsigned int value2, unsigned int value3),
  208. TP_ARGS(value1, value2, value3),
  209. TP_STRUCT__entry(
  210. __field(unsigned long long, value1)
  211. __field(unsigned int, value2)
  212. __field(unsigned int, value3)
  213. ),
  214. TP_fast_assign(
  215. __entry->value1 = value1;
  216. __entry->value2 = value2;
  217. __entry->value3 = value3;
  218. ),
  219. TP_printk("%llu %u %u", __entry->value1,
  220. __entry->value2, __entry->value3)
  221. );
  222. #define DEFINE_OCFS2_ULL_UINT_UINT_EVENT(name) \
  223. DEFINE_EVENT(ocfs2__ull_uint_uint, name, \
  224. TP_PROTO(unsigned long long val1, \
  225. unsigned int val2, unsigned int val3), \
  226. TP_ARGS(val1, val2, val3))
  227. DECLARE_EVENT_CLASS(ocfs2__uint_uint_uint,
  228. TP_PROTO(unsigned int value1, unsigned int value2,
  229. unsigned int value3),
  230. TP_ARGS(value1, value2, value3),
  231. TP_STRUCT__entry(
  232. __field( unsigned int, value1 )
  233. __field( unsigned int, value2 )
  234. __field( unsigned int, value3 )
  235. ),
  236. TP_fast_assign(
  237. __entry->value1 = value1;
  238. __entry->value2 = value2;
  239. __entry->value3 = value3;
  240. ),
  241. TP_printk("%u %u %u", __entry->value1, __entry->value2, __entry->value3)
  242. );
  243. #define DEFINE_OCFS2_UINT_UINT_UINT_EVENT(name) \
  244. DEFINE_EVENT(ocfs2__uint_uint_uint, name, \
  245. TP_PROTO(unsigned int value1, unsigned int value2, \
  246. unsigned int value3), \
  247. TP_ARGS(value1, value2, value3))
  248. DECLARE_EVENT_CLASS(ocfs2__ull_ull_ull,
  249. TP_PROTO(unsigned long long value1,
  250. unsigned long long value2, unsigned long long value3),
  251. TP_ARGS(value1, value2, value3),
  252. TP_STRUCT__entry(
  253. __field(unsigned long long, value1)
  254. __field(unsigned long long, value2)
  255. __field(unsigned long long, value3)
  256. ),
  257. TP_fast_assign(
  258. __entry->value1 = value1;
  259. __entry->value2 = value2;
  260. __entry->value3 = value3;
  261. ),
  262. TP_printk("%llu %llu %llu",
  263. __entry->value1, __entry->value2, __entry->value3)
  264. );
  265. #define DEFINE_OCFS2_ULL_ULL_ULL_EVENT(name) \
  266. DEFINE_EVENT(ocfs2__ull_ull_ull, name, \
  267. TP_PROTO(unsigned long long value1, unsigned long long value2, \
  268. unsigned long long value3), \
  269. TP_ARGS(value1, value2, value3))
  270. DECLARE_EVENT_CLASS(ocfs2__ull_int_int_int,
  271. TP_PROTO(unsigned long long ull, int value1, int value2, int value3),
  272. TP_ARGS(ull, value1, value2, value3),
  273. TP_STRUCT__entry(
  274. __field( unsigned long long, ull )
  275. __field( int, value1 )
  276. __field( int, value2 )
  277. __field( int, value3 )
  278. ),
  279. TP_fast_assign(
  280. __entry->ull = ull;
  281. __entry->value1 = value1;
  282. __entry->value2 = value2;
  283. __entry->value3 = value3;
  284. ),
  285. TP_printk("%llu %d %d %d",
  286. __entry->ull, __entry->value1,
  287. __entry->value2, __entry->value3)
  288. );
  289. #define DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(name) \
  290. DEFINE_EVENT(ocfs2__ull_int_int_int, name, \
  291. TP_PROTO(unsigned long long ull, int value1, \
  292. int value2, int value3), \
  293. TP_ARGS(ull, value1, value2, value3))
  294. DECLARE_EVENT_CLASS(ocfs2__ull_uint_uint_uint,
  295. TP_PROTO(unsigned long long ull, unsigned int value1,
  296. unsigned int value2, unsigned int value3),
  297. TP_ARGS(ull, value1, value2, value3),
  298. TP_STRUCT__entry(
  299. __field(unsigned long long, ull)
  300. __field(unsigned int, value1)
  301. __field(unsigned int, value2)
  302. __field(unsigned int, value3)
  303. ),
  304. TP_fast_assign(
  305. __entry->ull = ull;
  306. __entry->value1 = value1;
  307. __entry->value2 = value2;
  308. __entry->value3 = value3;
  309. ),
  310. TP_printk("%llu %u %u %u",
  311. __entry->ull, __entry->value1,
  312. __entry->value2, __entry->value3)
  313. );
  314. #define DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(name) \
  315. DEFINE_EVENT(ocfs2__ull_uint_uint_uint, name, \
  316. TP_PROTO(unsigned long long ull, unsigned int value1, \
  317. unsigned int value2, unsigned int value3), \
  318. TP_ARGS(ull, value1, value2, value3))
  319. DECLARE_EVENT_CLASS(ocfs2__ull_ull_uint_uint,
  320. TP_PROTO(unsigned long long value1, unsigned long long value2,
  321. unsigned int value3, unsigned int value4),
  322. TP_ARGS(value1, value2, value3, value4),
  323. TP_STRUCT__entry(
  324. __field(unsigned long long, value1)
  325. __field(unsigned long long, value2)
  326. __field(unsigned int, value3)
  327. __field(unsigned int, value4)
  328. ),
  329. TP_fast_assign(
  330. __entry->value1 = value1;
  331. __entry->value2 = value2;
  332. __entry->value3 = value3;
  333. __entry->value4 = value4;
  334. ),
  335. TP_printk("%llu %llu %u %u",
  336. __entry->value1, __entry->value2,
  337. __entry->value3, __entry->value4)
  338. );
  339. #define DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(name) \
  340. DEFINE_EVENT(ocfs2__ull_ull_uint_uint, name, \
  341. TP_PROTO(unsigned long long ull, unsigned long long ull1, \
  342. unsigned int value2, unsigned int value3), \
  343. TP_ARGS(ull, ull1, value2, value3))
  344. /* Trace events for fs/ocfs2/alloc.c. */
  345. DECLARE_EVENT_CLASS(ocfs2__btree_ops,
  346. TP_PROTO(unsigned long long owner,\
  347. unsigned int value1, unsigned int value2),
  348. TP_ARGS(owner, value1, value2),
  349. TP_STRUCT__entry(
  350. __field(unsigned long long, owner)
  351. __field(unsigned int, value1)
  352. __field(unsigned int, value2)
  353. ),
  354. TP_fast_assign(
  355. __entry->owner = owner;
  356. __entry->value1 = value1;
  357. __entry->value2 = value2;
  358. ),
  359. TP_printk("%llu %u %u",
  360. __entry->owner, __entry->value1, __entry->value2)
  361. );
  362. #define DEFINE_OCFS2_BTREE_EVENT(name) \
  363. DEFINE_EVENT(ocfs2__btree_ops, name, \
  364. TP_PROTO(unsigned long long owner, \
  365. unsigned int value1, unsigned int value2), \
  366. TP_ARGS(owner, value1, value2))
  367. DEFINE_OCFS2_BTREE_EVENT(ocfs2_adjust_rightmost_branch);
  368. DEFINE_OCFS2_BTREE_EVENT(ocfs2_rotate_tree_right);
  369. DEFINE_OCFS2_BTREE_EVENT(ocfs2_append_rec_to_path);
  370. DEFINE_OCFS2_BTREE_EVENT(ocfs2_insert_extent_start);
  371. DEFINE_OCFS2_BTREE_EVENT(ocfs2_add_clusters_in_btree);
  372. DEFINE_OCFS2_INT_EVENT(ocfs2_num_free_extents);
  373. DEFINE_OCFS2_INT_EVENT(ocfs2_complete_edge_insert);
  374. TRACE_EVENT(ocfs2_grow_tree,
  375. TP_PROTO(unsigned long long owner, int depth),
  376. TP_ARGS(owner, depth),
  377. TP_STRUCT__entry(
  378. __field(unsigned long long, owner)
  379. __field(int, depth)
  380. ),
  381. TP_fast_assign(
  382. __entry->owner = owner;
  383. __entry->depth = depth;
  384. ),
  385. TP_printk("%llu %d", __entry->owner, __entry->depth)
  386. );
  387. TRACE_EVENT(ocfs2_rotate_subtree,
  388. TP_PROTO(int subtree_root, unsigned long long blkno,
  389. int depth),
  390. TP_ARGS(subtree_root, blkno, depth),
  391. TP_STRUCT__entry(
  392. __field(int, subtree_root)
  393. __field(unsigned long long, blkno)
  394. __field(int, depth)
  395. ),
  396. TP_fast_assign(
  397. __entry->subtree_root = subtree_root;
  398. __entry->blkno = blkno;
  399. __entry->depth = depth;
  400. ),
  401. TP_printk("%d %llu %d", __entry->subtree_root,
  402. __entry->blkno, __entry->depth)
  403. );
  404. TRACE_EVENT(ocfs2_insert_extent,
  405. TP_PROTO(unsigned int ins_appending, unsigned int ins_contig,
  406. int ins_contig_index, int free_records, int ins_tree_depth),
  407. TP_ARGS(ins_appending, ins_contig, ins_contig_index, free_records,
  408. ins_tree_depth),
  409. TP_STRUCT__entry(
  410. __field(unsigned int, ins_appending)
  411. __field(unsigned int, ins_contig)
  412. __field(int, ins_contig_index)
  413. __field(int, free_records)
  414. __field(int, ins_tree_depth)
  415. ),
  416. TP_fast_assign(
  417. __entry->ins_appending = ins_appending;
  418. __entry->ins_contig = ins_contig;
  419. __entry->ins_contig_index = ins_contig_index;
  420. __entry->free_records = free_records;
  421. __entry->ins_tree_depth = ins_tree_depth;
  422. ),
  423. TP_printk("%u %u %d %d %d",
  424. __entry->ins_appending, __entry->ins_contig,
  425. __entry->ins_contig_index, __entry->free_records,
  426. __entry->ins_tree_depth)
  427. );
  428. TRACE_EVENT(ocfs2_split_extent,
  429. TP_PROTO(int split_index, unsigned int c_contig_type,
  430. unsigned int c_has_empty_extent,
  431. unsigned int c_split_covers_rec),
  432. TP_ARGS(split_index, c_contig_type,
  433. c_has_empty_extent, c_split_covers_rec),
  434. TP_STRUCT__entry(
  435. __field(int, split_index)
  436. __field(unsigned int, c_contig_type)
  437. __field(unsigned int, c_has_empty_extent)
  438. __field(unsigned int, c_split_covers_rec)
  439. ),
  440. TP_fast_assign(
  441. __entry->split_index = split_index;
  442. __entry->c_contig_type = c_contig_type;
  443. __entry->c_has_empty_extent = c_has_empty_extent;
  444. __entry->c_split_covers_rec = c_split_covers_rec;
  445. ),
  446. TP_printk("%d %u %u %u", __entry->split_index, __entry->c_contig_type,
  447. __entry->c_has_empty_extent, __entry->c_split_covers_rec)
  448. );
  449. TRACE_EVENT(ocfs2_remove_extent,
  450. TP_PROTO(unsigned long long owner, unsigned int cpos,
  451. unsigned int len, int index,
  452. unsigned int e_cpos, unsigned int clusters),
  453. TP_ARGS(owner, cpos, len, index, e_cpos, clusters),
  454. TP_STRUCT__entry(
  455. __field(unsigned long long, owner)
  456. __field(unsigned int, cpos)
  457. __field(unsigned int, len)
  458. __field(int, index)
  459. __field(unsigned int, e_cpos)
  460. __field(unsigned int, clusters)
  461. ),
  462. TP_fast_assign(
  463. __entry->owner = owner;
  464. __entry->cpos = cpos;
  465. __entry->len = len;
  466. __entry->index = index;
  467. __entry->e_cpos = e_cpos;
  468. __entry->clusters = clusters;
  469. ),
  470. TP_printk("%llu %u %u %d %u %u",
  471. __entry->owner, __entry->cpos, __entry->len, __entry->index,
  472. __entry->e_cpos, __entry->clusters)
  473. );
  474. TRACE_EVENT(ocfs2_commit_truncate,
  475. TP_PROTO(unsigned long long ino, unsigned int new_cpos,
  476. unsigned int clusters, unsigned int depth),
  477. TP_ARGS(ino, new_cpos, clusters, depth),
  478. TP_STRUCT__entry(
  479. __field(unsigned long long, ino)
  480. __field(unsigned int, new_cpos)
  481. __field(unsigned int, clusters)
  482. __field(unsigned int, depth)
  483. ),
  484. TP_fast_assign(
  485. __entry->ino = ino;
  486. __entry->new_cpos = new_cpos;
  487. __entry->clusters = clusters;
  488. __entry->depth = depth;
  489. ),
  490. TP_printk("%llu %u %u %u",
  491. __entry->ino, __entry->new_cpos,
  492. __entry->clusters, __entry->depth)
  493. );
  494. TRACE_EVENT(ocfs2_validate_extent_block,
  495. TP_PROTO(unsigned long long blkno),
  496. TP_ARGS(blkno),
  497. TP_STRUCT__entry(
  498. __field(unsigned long long, blkno)
  499. ),
  500. TP_fast_assign(
  501. __entry->blkno = blkno;
  502. ),
  503. TP_printk("%llu ", __entry->blkno)
  504. );
  505. TRACE_EVENT(ocfs2_rotate_leaf,
  506. TP_PROTO(unsigned int insert_cpos, int insert_index,
  507. int has_empty, int next_free,
  508. unsigned int l_count),
  509. TP_ARGS(insert_cpos, insert_index, has_empty,
  510. next_free, l_count),
  511. TP_STRUCT__entry(
  512. __field(unsigned int, insert_cpos)
  513. __field(int, insert_index)
  514. __field(int, has_empty)
  515. __field(int, next_free)
  516. __field(unsigned int, l_count)
  517. ),
  518. TP_fast_assign(
  519. __entry->insert_cpos = insert_cpos;
  520. __entry->insert_index = insert_index;
  521. __entry->has_empty = has_empty;
  522. __entry->next_free = next_free;
  523. __entry->l_count = l_count;
  524. ),
  525. TP_printk("%u %d %d %d %u", __entry->insert_cpos,
  526. __entry->insert_index, __entry->has_empty,
  527. __entry->next_free, __entry->l_count)
  528. );
  529. TRACE_EVENT(ocfs2_add_clusters_in_btree_ret,
  530. TP_PROTO(int status, int reason, int err),
  531. TP_ARGS(status, reason, err),
  532. TP_STRUCT__entry(
  533. __field(int, status)
  534. __field(int, reason)
  535. __field(int, err)
  536. ),
  537. TP_fast_assign(
  538. __entry->status = status;
  539. __entry->reason = reason;
  540. __entry->err = err;
  541. ),
  542. TP_printk("%d %d %d", __entry->status,
  543. __entry->reason, __entry->err)
  544. );
  545. TRACE_EVENT(ocfs2_mark_extent_written,
  546. TP_PROTO(unsigned long long owner, unsigned int cpos,
  547. unsigned int len, unsigned int phys),
  548. TP_ARGS(owner, cpos, len, phys),
  549. TP_STRUCT__entry(
  550. __field(unsigned long long, owner)
  551. __field(unsigned int, cpos)
  552. __field(unsigned int, len)
  553. __field(unsigned int, phys)
  554. ),
  555. TP_fast_assign(
  556. __entry->owner = owner;
  557. __entry->cpos = cpos;
  558. __entry->len = len;
  559. __entry->phys = phys;
  560. ),
  561. TP_printk("%llu %u %u %u",
  562. __entry->owner, __entry->cpos,
  563. __entry->len, __entry->phys)
  564. );
  565. DECLARE_EVENT_CLASS(ocfs2__truncate_log_ops,
  566. TP_PROTO(unsigned long long blkno, int index,
  567. unsigned int start, unsigned int num),
  568. TP_ARGS(blkno, index, start, num),
  569. TP_STRUCT__entry(
  570. __field(unsigned long long, blkno)
  571. __field(int, index)
  572. __field(unsigned int, start)
  573. __field(unsigned int, num)
  574. ),
  575. TP_fast_assign(
  576. __entry->blkno = blkno;
  577. __entry->index = index;
  578. __entry->start = start;
  579. __entry->num = num;
  580. ),
  581. TP_printk("%llu %d %u %u",
  582. __entry->blkno, __entry->index,
  583. __entry->start, __entry->num)
  584. );
  585. #define DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(name) \
  586. DEFINE_EVENT(ocfs2__truncate_log_ops, name, \
  587. TP_PROTO(unsigned long long blkno, int index, \
  588. unsigned int start, unsigned int num), \
  589. TP_ARGS(blkno, index, start, num))
  590. DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_truncate_log_append);
  591. DEFINE_OCFS2_TRUNCATE_LOG_OPS_EVENT(ocfs2_replay_truncate_records);
  592. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_flush_truncate_log);
  593. DEFINE_OCFS2_INT_EVENT(ocfs2_begin_truncate_log_recovery);
  594. DEFINE_OCFS2_INT_EVENT(ocfs2_truncate_log_recovery_num);
  595. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_complete_truncate_log_recovery);
  596. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_free_cached_blocks);
  597. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_cache_cluster_dealloc);
  598. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_run_deallocs);
  599. TRACE_EVENT(ocfs2_cache_block_dealloc,
  600. TP_PROTO(int type, int slot, unsigned long long suballoc,
  601. unsigned long long blkno, unsigned int bit),
  602. TP_ARGS(type, slot, suballoc, blkno, bit),
  603. TP_STRUCT__entry(
  604. __field(int, type)
  605. __field(int, slot)
  606. __field(unsigned long long, suballoc)
  607. __field(unsigned long long, blkno)
  608. __field(unsigned int, bit)
  609. ),
  610. TP_fast_assign(
  611. __entry->type = type;
  612. __entry->slot = slot;
  613. __entry->suballoc = suballoc;
  614. __entry->blkno = blkno;
  615. __entry->bit = bit;
  616. ),
  617. TP_printk("%d %d %llu %llu %u",
  618. __entry->type, __entry->slot, __entry->suballoc,
  619. __entry->blkno, __entry->bit)
  620. );
  621. TRACE_EVENT(ocfs2_trim_extent,
  622. TP_PROTO(struct super_block *sb, unsigned long long blk,
  623. unsigned long long count),
  624. TP_ARGS(sb, blk, count),
  625. TP_STRUCT__entry(
  626. __field(int, dev_major)
  627. __field(int, dev_minor)
  628. __field(unsigned long long, blk)
  629. __field(__u64, count)
  630. ),
  631. TP_fast_assign(
  632. __entry->dev_major = MAJOR(sb->s_dev);
  633. __entry->dev_minor = MINOR(sb->s_dev);
  634. __entry->blk = blk;
  635. __entry->count = count;
  636. ),
  637. TP_printk("%d %d %llu %llu",
  638. __entry->dev_major, __entry->dev_minor,
  639. __entry->blk, __entry->count)
  640. );
  641. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_trim_group);
  642. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_fs);
  643. /* End of trace events for fs/ocfs2/alloc.c. */
  644. /* Trace events for fs/ocfs2/localalloc.c. */
  645. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_la_set_sizes);
  646. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_alloc_should_use_local);
  647. DEFINE_OCFS2_INT_EVENT(ocfs2_load_local_alloc);
  648. DEFINE_OCFS2_INT_EVENT(ocfs2_begin_local_alloc_recovery);
  649. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_reserve_local_alloc_bits);
  650. DEFINE_OCFS2_UINT_EVENT(ocfs2_local_alloc_count_bits);
  651. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits_search_bitmap);
  652. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_local_alloc_find_clear_bits);
  653. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_sync_local_to_main);
  654. TRACE_EVENT(ocfs2_sync_local_to_main_free,
  655. TP_PROTO(int count, int bit, unsigned long long start_blk,
  656. unsigned long long blkno),
  657. TP_ARGS(count, bit, start_blk, blkno),
  658. TP_STRUCT__entry(
  659. __field(int, count)
  660. __field(int, bit)
  661. __field(unsigned long long, start_blk)
  662. __field(unsigned long long, blkno)
  663. ),
  664. TP_fast_assign(
  665. __entry->count = count;
  666. __entry->bit = bit;
  667. __entry->start_blk = start_blk;
  668. __entry->blkno = blkno;
  669. ),
  670. TP_printk("%d %d %llu %llu",
  671. __entry->count, __entry->bit, __entry->start_blk,
  672. __entry->blkno)
  673. );
  674. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_local_alloc_new_window);
  675. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_local_alloc_new_window_result);
  676. /* End of trace events for fs/ocfs2/localalloc.c. */
  677. /* Trace events for fs/ocfs2/resize.c. */
  678. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_update_last_group_and_inode);
  679. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_group_extend);
  680. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_group_add);
  681. /* End of trace events for fs/ocfs2/resize.c. */
  682. /* Trace events for fs/ocfs2/suballoc.c. */
  683. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_group_descriptor);
  684. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_contig);
  685. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_block_group_alloc_discontig);
  686. DEFINE_OCFS2_ULL_EVENT(ocfs2_block_group_alloc);
  687. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_nospc);
  688. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_reserve_suballoc_bits_no_new_group);
  689. DEFINE_OCFS2_ULL_EVENT(ocfs2_reserve_new_inode_new_group);
  690. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_set_bits);
  691. TRACE_EVENT(ocfs2_relink_block_group,
  692. TP_PROTO(unsigned long long i_blkno, unsigned int chain,
  693. unsigned long long bg_blkno,
  694. unsigned long long prev_blkno),
  695. TP_ARGS(i_blkno, chain, bg_blkno, prev_blkno),
  696. TP_STRUCT__entry(
  697. __field(unsigned long long, i_blkno)
  698. __field(unsigned int, chain)
  699. __field(unsigned long long, bg_blkno)
  700. __field(unsigned long long, prev_blkno)
  701. ),
  702. TP_fast_assign(
  703. __entry->i_blkno = i_blkno;
  704. __entry->chain = chain;
  705. __entry->bg_blkno = bg_blkno;
  706. __entry->prev_blkno = prev_blkno;
  707. ),
  708. TP_printk("%llu %u %llu %llu",
  709. __entry->i_blkno, __entry->chain, __entry->bg_blkno,
  710. __entry->prev_blkno)
  711. );
  712. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_cluster_group_search_wrong_max_bits);
  713. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cluster_group_search_max_block);
  714. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_block_group_search_max_block);
  715. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_search_chain_begin);
  716. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_succ);
  717. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_search_chain_end);
  718. DEFINE_OCFS2_UINT_EVENT(ocfs2_claim_suballoc_bits);
  719. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_claim_new_inode_at_loc);
  720. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_block_group_clear_bits);
  721. TRACE_EVENT(ocfs2_free_suballoc_bits,
  722. TP_PROTO(unsigned long long inode, unsigned long long group,
  723. unsigned int start_bit, unsigned int count),
  724. TP_ARGS(inode, group, start_bit, count),
  725. TP_STRUCT__entry(
  726. __field(unsigned long long, inode)
  727. __field(unsigned long long, group)
  728. __field(unsigned int, start_bit)
  729. __field(unsigned int, count)
  730. ),
  731. TP_fast_assign(
  732. __entry->inode = inode;
  733. __entry->group = group;
  734. __entry->start_bit = start_bit;
  735. __entry->count = count;
  736. ),
  737. TP_printk("%llu %llu %u %u", __entry->inode, __entry->group,
  738. __entry->start_bit, __entry->count)
  739. );
  740. TRACE_EVENT(ocfs2_free_clusters,
  741. TP_PROTO(unsigned long long bg_blkno, unsigned long long start_blk,
  742. unsigned int start_bit, unsigned int count),
  743. TP_ARGS(bg_blkno, start_blk, start_bit, count),
  744. TP_STRUCT__entry(
  745. __field(unsigned long long, bg_blkno)
  746. __field(unsigned long long, start_blk)
  747. __field(unsigned int, start_bit)
  748. __field(unsigned int, count)
  749. ),
  750. TP_fast_assign(
  751. __entry->bg_blkno = bg_blkno;
  752. __entry->start_blk = start_blk;
  753. __entry->start_bit = start_bit;
  754. __entry->count = count;
  755. ),
  756. TP_printk("%llu %llu %u %u", __entry->bg_blkno, __entry->start_blk,
  757. __entry->start_bit, __entry->count)
  758. );
  759. DEFINE_OCFS2_ULL_EVENT(ocfs2_get_suballoc_slot_bit);
  760. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_test_suballoc_bit);
  761. DEFINE_OCFS2_ULL_EVENT(ocfs2_test_inode_bit);
  762. /* End of trace events for fs/ocfs2/suballoc.c. */
  763. /* Trace events for fs/ocfs2/refcounttree.c. */
  764. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_refcount_block);
  765. DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_refcount_trees);
  766. DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree);
  767. DEFINE_OCFS2_ULL_EVENT(ocfs2_create_refcount_tree_blkno);
  768. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_change_refcount_rec);
  769. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_expand_inline_ref_root);
  770. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_divide_leaf_refcount_block);
  771. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_new_leaf_refcount_block);
  772. DECLARE_EVENT_CLASS(ocfs2__refcount_tree_ops,
  773. TP_PROTO(unsigned long long blkno, int index,
  774. unsigned long long cpos,
  775. unsigned int clusters, unsigned int refcount),
  776. TP_ARGS(blkno, index, cpos, clusters, refcount),
  777. TP_STRUCT__entry(
  778. __field(unsigned long long, blkno)
  779. __field(int, index)
  780. __field(unsigned long long, cpos)
  781. __field(unsigned int, clusters)
  782. __field(unsigned int, refcount)
  783. ),
  784. TP_fast_assign(
  785. __entry->blkno = blkno;
  786. __entry->index = index;
  787. __entry->cpos = cpos;
  788. __entry->clusters = clusters;
  789. __entry->refcount = refcount;
  790. ),
  791. TP_printk("%llu %d %llu %u %u", __entry->blkno, __entry->index,
  792. __entry->cpos, __entry->clusters, __entry->refcount)
  793. );
  794. #define DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(name) \
  795. DEFINE_EVENT(ocfs2__refcount_tree_ops, name, \
  796. TP_PROTO(unsigned long long blkno, int index, \
  797. unsigned long long cpos, \
  798. unsigned int count, unsigned int refcount), \
  799. TP_ARGS(blkno, index, cpos, count, refcount))
  800. DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_insert_refcount_rec);
  801. TRACE_EVENT(ocfs2_split_refcount_rec,
  802. TP_PROTO(unsigned long long cpos,
  803. unsigned int clusters, unsigned int refcount,
  804. unsigned long long split_cpos,
  805. unsigned int split_clusters, unsigned int split_refcount),
  806. TP_ARGS(cpos, clusters, refcount,
  807. split_cpos, split_clusters, split_refcount),
  808. TP_STRUCT__entry(
  809. __field(unsigned long long, cpos)
  810. __field(unsigned int, clusters)
  811. __field(unsigned int, refcount)
  812. __field(unsigned long long, split_cpos)
  813. __field(unsigned int, split_clusters)
  814. __field(unsigned int, split_refcount)
  815. ),
  816. TP_fast_assign(
  817. __entry->cpos = cpos;
  818. __entry->clusters = clusters;
  819. __entry->refcount = refcount;
  820. __entry->split_cpos = split_cpos;
  821. __entry->split_clusters = split_clusters;
  822. __entry->split_refcount = split_refcount;
  823. ),
  824. TP_printk("%llu %u %u %llu %u %u",
  825. __entry->cpos, __entry->clusters, __entry->refcount,
  826. __entry->split_cpos, __entry->split_clusters,
  827. __entry->split_refcount)
  828. );
  829. DEFINE_OCFS2_REFCOUNT_TREE_OPS_EVENT(ocfs2_split_refcount_rec_insert);
  830. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_increase_refcount_begin);
  831. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_change);
  832. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_increase_refcount_insert);
  833. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_increase_refcount_split);
  834. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_remove_refcount_extent);
  835. DEFINE_OCFS2_ULL_EVENT(ocfs2_restore_refcount_block);
  836. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_decrease_refcount_rec);
  837. TRACE_EVENT(ocfs2_decrease_refcount,
  838. TP_PROTO(unsigned long long owner,
  839. unsigned long long cpos,
  840. unsigned int len, int delete),
  841. TP_ARGS(owner, cpos, len, delete),
  842. TP_STRUCT__entry(
  843. __field(unsigned long long, owner)
  844. __field(unsigned long long, cpos)
  845. __field(unsigned int, len)
  846. __field(int, delete)
  847. ),
  848. TP_fast_assign(
  849. __entry->owner = owner;
  850. __entry->cpos = cpos;
  851. __entry->len = len;
  852. __entry->delete = delete;
  853. ),
  854. TP_printk("%llu %llu %u %d",
  855. __entry->owner, __entry->cpos, __entry->len, __entry->delete)
  856. );
  857. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_mark_extent_refcounted);
  858. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_calc_refcount_meta_credits);
  859. TRACE_EVENT(ocfs2_calc_refcount_meta_credits_iterate,
  860. TP_PROTO(int recs_add, unsigned long long cpos,
  861. unsigned int clusters, unsigned long long r_cpos,
  862. unsigned int r_clusters, unsigned int refcount, int index),
  863. TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index),
  864. TP_STRUCT__entry(
  865. __field(int, recs_add)
  866. __field(unsigned long long, cpos)
  867. __field(unsigned int, clusters)
  868. __field(unsigned long long, r_cpos)
  869. __field(unsigned int, r_clusters)
  870. __field(unsigned int, refcount)
  871. __field(int, index)
  872. ),
  873. TP_fast_assign(
  874. __entry->recs_add = recs_add;
  875. __entry->cpos = cpos;
  876. __entry->clusters = clusters;
  877. __entry->r_cpos = r_cpos;
  878. __entry->r_clusters = r_clusters;
  879. __entry->refcount = refcount;
  880. __entry->index = index;
  881. ),
  882. TP_printk("%d %llu %u %llu %u %u %d",
  883. __entry->recs_add, __entry->cpos, __entry->clusters,
  884. __entry->r_cpos, __entry->r_clusters,
  885. __entry->refcount, __entry->index)
  886. );
  887. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_add_refcount_flag);
  888. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_prepare_refcount_change_for_del);
  889. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_lock_refcount_allocators);
  890. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_page);
  891. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_duplicate_clusters_by_jbd);
  892. TRACE_EVENT(ocfs2_clear_ext_refcount,
  893. TP_PROTO(unsigned long long ino, unsigned int cpos,
  894. unsigned int len, unsigned int p_cluster,
  895. unsigned int ext_flags),
  896. TP_ARGS(ino, cpos, len, p_cluster, ext_flags),
  897. TP_STRUCT__entry(
  898. __field(unsigned long long, ino)
  899. __field(unsigned int, cpos)
  900. __field(unsigned int, len)
  901. __field(unsigned int, p_cluster)
  902. __field(unsigned int, ext_flags)
  903. ),
  904. TP_fast_assign(
  905. __entry->ino = ino;
  906. __entry->cpos = cpos;
  907. __entry->len = len;
  908. __entry->p_cluster = p_cluster;
  909. __entry->ext_flags = ext_flags;
  910. ),
  911. TP_printk("%llu %u %u %u %u",
  912. __entry->ino, __entry->cpos, __entry->len,
  913. __entry->p_cluster, __entry->ext_flags)
  914. );
  915. TRACE_EVENT(ocfs2_replace_clusters,
  916. TP_PROTO(unsigned long long ino, unsigned int cpos,
  917. unsigned int old, unsigned int new, unsigned int len,
  918. unsigned int ext_flags),
  919. TP_ARGS(ino, cpos, old, new, len, ext_flags),
  920. TP_STRUCT__entry(
  921. __field(unsigned long long, ino)
  922. __field(unsigned int, cpos)
  923. __field(unsigned int, old)
  924. __field(unsigned int, new)
  925. __field(unsigned int, len)
  926. __field(unsigned int, ext_flags)
  927. ),
  928. TP_fast_assign(
  929. __entry->ino = ino;
  930. __entry->cpos = cpos;
  931. __entry->old = old;
  932. __entry->new = new;
  933. __entry->len = len;
  934. __entry->ext_flags = ext_flags;
  935. ),
  936. TP_printk("%llu %u %u %u %u %u",
  937. __entry->ino, __entry->cpos, __entry->old, __entry->new,
  938. __entry->len, __entry->ext_flags)
  939. );
  940. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_make_clusters_writable);
  941. TRACE_EVENT(ocfs2_refcount_cow_hunk,
  942. TP_PROTO(unsigned long long ino, unsigned int cpos,
  943. unsigned int write_len, unsigned int max_cpos,
  944. unsigned int cow_start, unsigned int cow_len),
  945. TP_ARGS(ino, cpos, write_len, max_cpos, cow_start, cow_len),
  946. TP_STRUCT__entry(
  947. __field(unsigned long long, ino)
  948. __field(unsigned int, cpos)
  949. __field(unsigned int, write_len)
  950. __field(unsigned int, max_cpos)
  951. __field(unsigned int, cow_start)
  952. __field(unsigned int, cow_len)
  953. ),
  954. TP_fast_assign(
  955. __entry->ino = ino;
  956. __entry->cpos = cpos;
  957. __entry->write_len = write_len;
  958. __entry->max_cpos = max_cpos;
  959. __entry->cow_start = cow_start;
  960. __entry->cow_len = cow_len;
  961. ),
  962. TP_printk("%llu %u %u %u %u %u",
  963. __entry->ino, __entry->cpos, __entry->write_len,
  964. __entry->max_cpos, __entry->cow_start, __entry->cow_len)
  965. );
  966. /* End of trace events for fs/ocfs2/refcounttree.c. */
  967. /* Trace events for fs/ocfs2/aops.c. */
  968. DECLARE_EVENT_CLASS(ocfs2__get_block,
  969. TP_PROTO(unsigned long long ino, unsigned long long iblock,
  970. void *bh_result, int create),
  971. TP_ARGS(ino, iblock, bh_result, create),
  972. TP_STRUCT__entry(
  973. __field(unsigned long long, ino)
  974. __field(unsigned long long, iblock)
  975. __field(void *, bh_result)
  976. __field(int, create)
  977. ),
  978. TP_fast_assign(
  979. __entry->ino = ino;
  980. __entry->iblock = iblock;
  981. __entry->bh_result = bh_result;
  982. __entry->create = create;
  983. ),
  984. TP_printk("%llu %llu %p %d",
  985. __entry->ino, __entry->iblock,
  986. __entry->bh_result, __entry->create)
  987. );
  988. #define DEFINE_OCFS2_GET_BLOCK_EVENT(name) \
  989. DEFINE_EVENT(ocfs2__get_block, name, \
  990. TP_PROTO(unsigned long long ino, unsigned long long iblock, \
  991. void *bh_result, int create), \
  992. TP_ARGS(ino, iblock, bh_result, create))
  993. DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_symlink_get_block);
  994. DEFINE_OCFS2_GET_BLOCK_EVENT(ocfs2_get_block);
  995. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_get_block_end);
  996. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_readpage);
  997. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_writepage);
  998. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_bmap);
  999. TRACE_EVENT(ocfs2_try_to_write_inline_data,
  1000. TP_PROTO(unsigned long long ino, unsigned int len,
  1001. unsigned long long pos, unsigned int flags),
  1002. TP_ARGS(ino, len, pos, flags),
  1003. TP_STRUCT__entry(
  1004. __field(unsigned long long, ino)
  1005. __field(unsigned int, len)
  1006. __field(unsigned long long, pos)
  1007. __field(unsigned int, flags)
  1008. ),
  1009. TP_fast_assign(
  1010. __entry->ino = ino;
  1011. __entry->len = len;
  1012. __entry->pos = pos;
  1013. __entry->flags = flags;
  1014. ),
  1015. TP_printk("%llu %u %llu 0x%x",
  1016. __entry->ino, __entry->len, __entry->pos, __entry->flags)
  1017. );
  1018. TRACE_EVENT(ocfs2_write_begin_nolock,
  1019. TP_PROTO(unsigned long long ino,
  1020. long long i_size, unsigned int i_clusters,
  1021. unsigned long long pos, unsigned int len,
  1022. unsigned int flags, void *page,
  1023. unsigned int clusters, unsigned int extents_to_split),
  1024. TP_ARGS(ino, i_size, i_clusters, pos, len, flags,
  1025. page, clusters, extents_to_split),
  1026. TP_STRUCT__entry(
  1027. __field(unsigned long long, ino)
  1028. __field(long long, i_size)
  1029. __field(unsigned int, i_clusters)
  1030. __field(unsigned long long, pos)
  1031. __field(unsigned int, len)
  1032. __field(unsigned int, flags)
  1033. __field(void *, page)
  1034. __field(unsigned int, clusters)
  1035. __field(unsigned int, extents_to_split)
  1036. ),
  1037. TP_fast_assign(
  1038. __entry->ino = ino;
  1039. __entry->i_size = i_size;
  1040. __entry->i_clusters = i_clusters;
  1041. __entry->pos = pos;
  1042. __entry->len = len;
  1043. __entry->flags = flags;
  1044. __entry->page = page;
  1045. __entry->clusters = clusters;
  1046. __entry->extents_to_split = extents_to_split;
  1047. ),
  1048. TP_printk("%llu %lld %u %llu %u %u %p %u %u",
  1049. __entry->ino, __entry->i_size, __entry->i_clusters,
  1050. __entry->pos, __entry->len,
  1051. __entry->flags, __entry->page, __entry->clusters,
  1052. __entry->extents_to_split)
  1053. );
  1054. TRACE_EVENT(ocfs2_write_end_inline,
  1055. TP_PROTO(unsigned long long ino,
  1056. unsigned long long pos, unsigned int copied,
  1057. unsigned int id_count, unsigned int features),
  1058. TP_ARGS(ino, pos, copied, id_count, features),
  1059. TP_STRUCT__entry(
  1060. __field(unsigned long long, ino)
  1061. __field(unsigned long long, pos)
  1062. __field(unsigned int, copied)
  1063. __field(unsigned int, id_count)
  1064. __field(unsigned int, features)
  1065. ),
  1066. TP_fast_assign(
  1067. __entry->ino = ino;
  1068. __entry->pos = pos;
  1069. __entry->copied = copied;
  1070. __entry->id_count = id_count;
  1071. __entry->features = features;
  1072. ),
  1073. TP_printk("%llu %llu %u %u %u",
  1074. __entry->ino, __entry->pos, __entry->copied,
  1075. __entry->id_count, __entry->features)
  1076. );
  1077. /* End of trace events for fs/ocfs2/aops.c. */
  1078. /* Trace events for fs/ocfs2/mmap.c. */
  1079. TRACE_EVENT(ocfs2_fault,
  1080. TP_PROTO(unsigned long long ino,
  1081. void *area, void *page, unsigned long pgoff),
  1082. TP_ARGS(ino, area, page, pgoff),
  1083. TP_STRUCT__entry(
  1084. __field(unsigned long long, ino)
  1085. __field(void *, area)
  1086. __field(void *, page)
  1087. __field(unsigned long, pgoff)
  1088. ),
  1089. TP_fast_assign(
  1090. __entry->ino = ino;
  1091. __entry->area = area;
  1092. __entry->page = page;
  1093. __entry->pgoff = pgoff;
  1094. ),
  1095. TP_printk("%llu %p %p %lu",
  1096. __entry->ino, __entry->area, __entry->page, __entry->pgoff)
  1097. );
  1098. /* End of trace events for fs/ocfs2/mmap.c. */
  1099. /* Trace events for fs/ocfs2/file.c. */
  1100. DECLARE_EVENT_CLASS(ocfs2__file_ops,
  1101. TP_PROTO(void *inode, void *file, void *dentry,
  1102. unsigned long long ino,
  1103. unsigned int d_len, const unsigned char *d_name,
  1104. unsigned long long para),
  1105. TP_ARGS(inode, file, dentry, ino, d_len, d_name, para),
  1106. TP_STRUCT__entry(
  1107. __field(void *, inode)
  1108. __field(void *, file)
  1109. __field(void *, dentry)
  1110. __field(unsigned long long, ino)
  1111. __field(unsigned int, d_len)
  1112. __string(d_name, d_name)
  1113. __field(unsigned long long, para)
  1114. ),
  1115. TP_fast_assign(
  1116. __entry->inode = inode;
  1117. __entry->file = file;
  1118. __entry->dentry = dentry;
  1119. __entry->ino = ino;
  1120. __entry->d_len = d_len;
  1121. __assign_str(d_name, d_name);
  1122. __entry->para = para;
  1123. ),
  1124. TP_printk("%p %p %p %llu %llu %.*s", __entry->inode, __entry->file,
  1125. __entry->dentry, __entry->ino, __entry->para,
  1126. __entry->d_len, __get_str(d_name))
  1127. );
  1128. #define DEFINE_OCFS2_FILE_OPS(name) \
  1129. DEFINE_EVENT(ocfs2__file_ops, name, \
  1130. TP_PROTO(void *inode, void *file, void *dentry, \
  1131. unsigned long long ino, \
  1132. unsigned int d_len, const unsigned char *d_name, \
  1133. unsigned long long mode), \
  1134. TP_ARGS(inode, file, dentry, ino, d_len, d_name, mode))
  1135. DEFINE_OCFS2_FILE_OPS(ocfs2_file_open);
  1136. DEFINE_OCFS2_FILE_OPS(ocfs2_file_release);
  1137. DEFINE_OCFS2_FILE_OPS(ocfs2_sync_file);
  1138. DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_write);
  1139. DEFINE_OCFS2_FILE_OPS(ocfs2_file_splice_write);
  1140. DEFINE_OCFS2_FILE_OPS(ocfs2_file_aio_read);
  1141. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_truncate_file);
  1142. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_truncate_file_error);
  1143. TRACE_EVENT(ocfs2_extend_allocation,
  1144. TP_PROTO(unsigned long long ip_blkno, unsigned long long size,
  1145. unsigned int clusters, unsigned int clusters_to_add,
  1146. int why, int restart_func),
  1147. TP_ARGS(ip_blkno, size, clusters, clusters_to_add, why, restart_func),
  1148. TP_STRUCT__entry(
  1149. __field(unsigned long long, ip_blkno)
  1150. __field(unsigned long long, size)
  1151. __field(unsigned int, clusters)
  1152. __field(unsigned int, clusters_to_add)
  1153. __field(int, why)
  1154. __field(int, restart_func)
  1155. ),
  1156. TP_fast_assign(
  1157. __entry->ip_blkno = ip_blkno;
  1158. __entry->size = size;
  1159. __entry->clusters = clusters;
  1160. __entry->clusters_to_add = clusters_to_add;
  1161. __entry->why = why;
  1162. __entry->restart_func = restart_func;
  1163. ),
  1164. TP_printk("%llu %llu %u %u %d %d",
  1165. __entry->ip_blkno, __entry->size, __entry->clusters,
  1166. __entry->clusters_to_add, __entry->why, __entry->restart_func)
  1167. );
  1168. TRACE_EVENT(ocfs2_extend_allocation_end,
  1169. TP_PROTO(unsigned long long ino,
  1170. unsigned int di_clusters, unsigned long long di_size,
  1171. unsigned int ip_clusters, unsigned long long i_size),
  1172. TP_ARGS(ino, di_clusters, di_size, ip_clusters, i_size),
  1173. TP_STRUCT__entry(
  1174. __field(unsigned long long, ino)
  1175. __field(unsigned int, di_clusters)
  1176. __field(unsigned long long, di_size)
  1177. __field(unsigned int, ip_clusters)
  1178. __field(unsigned long long, i_size)
  1179. ),
  1180. TP_fast_assign(
  1181. __entry->ino = ino;
  1182. __entry->di_clusters = di_clusters;
  1183. __entry->di_size = di_size;
  1184. __entry->ip_clusters = ip_clusters;
  1185. __entry->i_size = i_size;
  1186. ),
  1187. TP_printk("%llu %u %llu %u %llu", __entry->ino, __entry->di_clusters,
  1188. __entry->di_size, __entry->ip_clusters, __entry->i_size)
  1189. );
  1190. TRACE_EVENT(ocfs2_write_zero_page,
  1191. TP_PROTO(unsigned long long ino,
  1192. unsigned long long abs_from, unsigned long long abs_to,
  1193. unsigned long index, unsigned int zero_from,
  1194. unsigned int zero_to),
  1195. TP_ARGS(ino, abs_from, abs_to, index, zero_from, zero_to),
  1196. TP_STRUCT__entry(
  1197. __field(unsigned long long, ino)
  1198. __field(unsigned long long, abs_from)
  1199. __field(unsigned long long, abs_to)
  1200. __field(unsigned long, index)
  1201. __field(unsigned int, zero_from)
  1202. __field(unsigned int, zero_to)
  1203. ),
  1204. TP_fast_assign(
  1205. __entry->ino = ino;
  1206. __entry->abs_from = abs_from;
  1207. __entry->abs_to = abs_to;
  1208. __entry->index = index;
  1209. __entry->zero_from = zero_from;
  1210. __entry->zero_to = zero_to;
  1211. ),
  1212. TP_printk("%llu %llu %llu %lu %u %u", __entry->ino,
  1213. __entry->abs_from, __entry->abs_to,
  1214. __entry->index, __entry->zero_from, __entry->zero_to)
  1215. );
  1216. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend_range);
  1217. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_extend);
  1218. TRACE_EVENT(ocfs2_setattr,
  1219. TP_PROTO(void *inode, void *dentry,
  1220. unsigned long long ino,
  1221. unsigned int d_len, const unsigned char *d_name,
  1222. unsigned int ia_valid, unsigned int ia_mode,
  1223. unsigned int ia_uid, unsigned int ia_gid),
  1224. TP_ARGS(inode, dentry, ino, d_len, d_name,
  1225. ia_valid, ia_mode, ia_uid, ia_gid),
  1226. TP_STRUCT__entry(
  1227. __field(void *, inode)
  1228. __field(void *, dentry)
  1229. __field(unsigned long long, ino)
  1230. __field(unsigned int, d_len)
  1231. __string(d_name, d_name)
  1232. __field(unsigned int, ia_valid)
  1233. __field(unsigned int, ia_mode)
  1234. __field(unsigned int, ia_uid)
  1235. __field(unsigned int, ia_gid)
  1236. ),
  1237. TP_fast_assign(
  1238. __entry->inode = inode;
  1239. __entry->dentry = dentry;
  1240. __entry->ino = ino;
  1241. __entry->d_len = d_len;
  1242. __assign_str(d_name, d_name);
  1243. __entry->ia_valid = ia_valid;
  1244. __entry->ia_mode = ia_mode;
  1245. __entry->ia_uid = ia_uid;
  1246. __entry->ia_gid = ia_gid;
  1247. ),
  1248. TP_printk("%p %p %llu %.*s %u %u %u %u", __entry->inode,
  1249. __entry->dentry, __entry->ino, __entry->d_len,
  1250. __get_str(d_name), __entry->ia_valid, __entry->ia_mode,
  1251. __entry->ia_uid, __entry->ia_gid)
  1252. );
  1253. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_write_remove_suid);
  1254. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_zero_partial_clusters);
  1255. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range1);
  1256. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_zero_partial_clusters_range2);
  1257. DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_remove_inode_range);
  1258. TRACE_EVENT(ocfs2_prepare_inode_for_write,
  1259. TP_PROTO(unsigned long long ino, unsigned long long saved_pos,
  1260. unsigned long count),
  1261. TP_ARGS(ino, saved_pos, count),
  1262. TP_STRUCT__entry(
  1263. __field(unsigned long long, ino)
  1264. __field(unsigned long long, saved_pos)
  1265. __field(unsigned long, count)
  1266. ),
  1267. TP_fast_assign(
  1268. __entry->ino = ino;
  1269. __entry->saved_pos = saved_pos;
  1270. __entry->count = count;
  1271. ),
  1272. TP_printk("%llu %llu %lu", __entry->ino,
  1273. __entry->saved_pos, __entry->count)
  1274. );
  1275. DEFINE_OCFS2_INT_EVENT(generic_file_aio_read_ret);
  1276. /* End of trace events for fs/ocfs2/file.c. */
  1277. /* Trace events for fs/ocfs2/inode.c. */
  1278. TRACE_EVENT(ocfs2_iget_begin,
  1279. TP_PROTO(unsigned long long ino, unsigned int flags, int sysfile_type),
  1280. TP_ARGS(ino, flags, sysfile_type),
  1281. TP_STRUCT__entry(
  1282. __field(unsigned long long, ino)
  1283. __field(unsigned int, flags)
  1284. __field(int, sysfile_type)
  1285. ),
  1286. TP_fast_assign(
  1287. __entry->ino = ino;
  1288. __entry->flags = flags;
  1289. __entry->sysfile_type = sysfile_type;
  1290. ),
  1291. TP_printk("%llu %u %d", __entry->ino,
  1292. __entry->flags, __entry->sysfile_type)
  1293. );
  1294. DEFINE_OCFS2_ULL_EVENT(ocfs2_iget5_locked);
  1295. TRACE_EVENT(ocfs2_iget_end,
  1296. TP_PROTO(void *inode, unsigned long long ino),
  1297. TP_ARGS(inode, ino),
  1298. TP_STRUCT__entry(
  1299. __field(void *, inode)
  1300. __field(unsigned long long, ino)
  1301. ),
  1302. TP_fast_assign(
  1303. __entry->inode = inode;
  1304. __entry->ino = ino;
  1305. ),
  1306. TP_printk("%p %llu", __entry->inode, __entry->ino)
  1307. );
  1308. TRACE_EVENT(ocfs2_find_actor,
  1309. TP_PROTO(void *inode, unsigned long long ino,
  1310. void *args, unsigned long long fi_blkno),
  1311. TP_ARGS(inode, ino, args, fi_blkno),
  1312. TP_STRUCT__entry(
  1313. __field(void *, inode)
  1314. __field(unsigned long long, ino)
  1315. __field(void *, args)
  1316. __field(unsigned long long, fi_blkno)
  1317. ),
  1318. TP_fast_assign(
  1319. __entry->inode = inode;
  1320. __entry->ino = ino;
  1321. __entry->args = args;
  1322. __entry->fi_blkno = fi_blkno;
  1323. ),
  1324. TP_printk("%p %llu %p %llu", __entry->inode, __entry->ino,
  1325. __entry->args, __entry->fi_blkno)
  1326. );
  1327. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_populate_inode);
  1328. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_read_locked_inode);
  1329. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_check_orphan_recovery_state);
  1330. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_inode_block);
  1331. DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_validate_inode_block);
  1332. DEFINE_OCFS2_ULL_EVENT(ocfs2_filecheck_repair_inode_block);
  1333. TRACE_EVENT(ocfs2_inode_is_valid_to_delete,
  1334. TP_PROTO(void *task, void *dc_task, unsigned long long ino,
  1335. unsigned int flags),
  1336. TP_ARGS(task, dc_task, ino, flags),
  1337. TP_STRUCT__entry(
  1338. __field(void *, task)
  1339. __field(void *, dc_task)
  1340. __field(unsigned long long, ino)
  1341. __field(unsigned int, flags)
  1342. ),
  1343. TP_fast_assign(
  1344. __entry->task = task;
  1345. __entry->dc_task = dc_task;
  1346. __entry->ino = ino;
  1347. __entry->flags = flags;
  1348. ),
  1349. TP_printk("%p %p %llu %u", __entry->task, __entry->dc_task,
  1350. __entry->ino, __entry->flags)
  1351. );
  1352. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_query_inode_wipe_begin);
  1353. DEFINE_OCFS2_UINT_EVENT(ocfs2_query_inode_wipe_succ);
  1354. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_query_inode_wipe_end);
  1355. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_cleanup_delete_inode);
  1356. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_delete_inode);
  1357. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_clear_inode);
  1358. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_drop_inode);
  1359. TRACE_EVENT(ocfs2_inode_revalidate,
  1360. TP_PROTO(void *inode, unsigned long long ino,
  1361. unsigned int flags),
  1362. TP_ARGS(inode, ino, flags),
  1363. TP_STRUCT__entry(
  1364. __field(void *, inode)
  1365. __field(unsigned long long, ino)
  1366. __field(unsigned int, flags)
  1367. ),
  1368. TP_fast_assign(
  1369. __entry->inode = inode;
  1370. __entry->ino = ino;
  1371. __entry->flags = flags;
  1372. ),
  1373. TP_printk("%p %llu %u", __entry->inode, __entry->ino, __entry->flags)
  1374. );
  1375. DEFINE_OCFS2_ULL_EVENT(ocfs2_mark_inode_dirty);
  1376. /* End of trace events for fs/ocfs2/inode.c. */
  1377. /* Trace events for fs/ocfs2/extent_map.c. */
  1378. TRACE_EVENT(ocfs2_read_virt_blocks,
  1379. TP_PROTO(void *inode, unsigned long long vblock, int nr,
  1380. void *bhs, unsigned int flags, void *validate),
  1381. TP_ARGS(inode, vblock, nr, bhs, flags, validate),
  1382. TP_STRUCT__entry(
  1383. __field(void *, inode)
  1384. __field(unsigned long long, vblock)
  1385. __field(int, nr)
  1386. __field(void *, bhs)
  1387. __field(unsigned int, flags)
  1388. __field(void *, validate)
  1389. ),
  1390. TP_fast_assign(
  1391. __entry->inode = inode;
  1392. __entry->vblock = vblock;
  1393. __entry->nr = nr;
  1394. __entry->bhs = bhs;
  1395. __entry->flags = flags;
  1396. __entry->validate = validate;
  1397. ),
  1398. TP_printk("%p %llu %d %p %x %p", __entry->inode, __entry->vblock,
  1399. __entry->nr, __entry->bhs, __entry->flags, __entry->validate)
  1400. );
  1401. /* End of trace events for fs/ocfs2/extent_map.c. */
  1402. /* Trace events for fs/ocfs2/slot_map.c. */
  1403. DEFINE_OCFS2_UINT_EVENT(ocfs2_refresh_slot_info);
  1404. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers);
  1405. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_map_slot_buffers_block);
  1406. DEFINE_OCFS2_INT_EVENT(ocfs2_find_slot);
  1407. /* End of trace events for fs/ocfs2/slot_map.c. */
  1408. /* Trace events for fs/ocfs2/heartbeat.c. */
  1409. DEFINE_OCFS2_INT_EVENT(ocfs2_do_node_down);
  1410. /* End of trace events for fs/ocfs2/heartbeat.c. */
  1411. /* Trace events for fs/ocfs2/super.c. */
  1412. TRACE_EVENT(ocfs2_remount,
  1413. TP_PROTO(unsigned long s_flags, unsigned long osb_flags, int flags),
  1414. TP_ARGS(s_flags, osb_flags, flags),
  1415. TP_STRUCT__entry(
  1416. __field(unsigned long, s_flags)
  1417. __field(unsigned long, osb_flags)
  1418. __field(int, flags)
  1419. ),
  1420. TP_fast_assign(
  1421. __entry->s_flags = s_flags;
  1422. __entry->osb_flags = osb_flags;
  1423. __entry->flags = flags;
  1424. ),
  1425. TP_printk("%lu %lu %d", __entry->s_flags,
  1426. __entry->osb_flags, __entry->flags)
  1427. );
  1428. TRACE_EVENT(ocfs2_fill_super,
  1429. TP_PROTO(void *sb, void *data, int silent),
  1430. TP_ARGS(sb, data, silent),
  1431. TP_STRUCT__entry(
  1432. __field(void *, sb)
  1433. __field(void *, data)
  1434. __field(int, silent)
  1435. ),
  1436. TP_fast_assign(
  1437. __entry->sb = sb;
  1438. __entry->data = data;
  1439. __entry->silent = silent;
  1440. ),
  1441. TP_printk("%p %p %d", __entry->sb,
  1442. __entry->data, __entry->silent)
  1443. );
  1444. TRACE_EVENT(ocfs2_parse_options,
  1445. TP_PROTO(int is_remount, char *options),
  1446. TP_ARGS(is_remount, options),
  1447. TP_STRUCT__entry(
  1448. __field(int, is_remount)
  1449. __string(options, options)
  1450. ),
  1451. TP_fast_assign(
  1452. __entry->is_remount = is_remount;
  1453. __assign_str(options, options);
  1454. ),
  1455. TP_printk("%d %s", __entry->is_remount, __get_str(options))
  1456. );
  1457. DEFINE_OCFS2_POINTER_EVENT(ocfs2_put_super);
  1458. TRACE_EVENT(ocfs2_statfs,
  1459. TP_PROTO(void *sb, void *buf),
  1460. TP_ARGS(sb, buf),
  1461. TP_STRUCT__entry(
  1462. __field(void *, sb)
  1463. __field(void *, buf)
  1464. ),
  1465. TP_fast_assign(
  1466. __entry->sb = sb;
  1467. __entry->buf = buf;
  1468. ),
  1469. TP_printk("%p %p", __entry->sb, __entry->buf)
  1470. );
  1471. DEFINE_OCFS2_POINTER_EVENT(ocfs2_dismount_volume);
  1472. TRACE_EVENT(ocfs2_initialize_super,
  1473. TP_PROTO(char *label, char *uuid_str, unsigned long long root_dir,
  1474. unsigned long long system_dir, int cluster_bits),
  1475. TP_ARGS(label, uuid_str, root_dir, system_dir, cluster_bits),
  1476. TP_STRUCT__entry(
  1477. __string(label, label)
  1478. __string(uuid_str, uuid_str)
  1479. __field(unsigned long long, root_dir)
  1480. __field(unsigned long long, system_dir)
  1481. __field(int, cluster_bits)
  1482. ),
  1483. TP_fast_assign(
  1484. __assign_str(label, label);
  1485. __assign_str(uuid_str, uuid_str);
  1486. __entry->root_dir = root_dir;
  1487. __entry->system_dir = system_dir;
  1488. __entry->cluster_bits = cluster_bits;
  1489. ),
  1490. TP_printk("%s %s %llu %llu %d", __get_str(label), __get_str(uuid_str),
  1491. __entry->root_dir, __entry->system_dir, __entry->cluster_bits)
  1492. );
  1493. /* End of trace events for fs/ocfs2/super.c. */
  1494. /* Trace events for fs/ocfs2/xattr.c. */
  1495. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_xattr_block);
  1496. DEFINE_OCFS2_UINT_EVENT(ocfs2_xattr_extend_allocation);
  1497. TRACE_EVENT(ocfs2_init_xattr_set_ctxt,
  1498. TP_PROTO(const char *name, int meta, int clusters, int credits),
  1499. TP_ARGS(name, meta, clusters, credits),
  1500. TP_STRUCT__entry(
  1501. __string(name, name)
  1502. __field(int, meta)
  1503. __field(int, clusters)
  1504. __field(int, credits)
  1505. ),
  1506. TP_fast_assign(
  1507. __assign_str(name, name);
  1508. __entry->meta = meta;
  1509. __entry->clusters = clusters;
  1510. __entry->credits = credits;
  1511. ),
  1512. TP_printk("%s %d %d %d", __get_str(name), __entry->meta,
  1513. __entry->clusters, __entry->credits)
  1514. );
  1515. DECLARE_EVENT_CLASS(ocfs2__xattr_find,
  1516. TP_PROTO(unsigned long long ino, const char *name, int name_index,
  1517. unsigned int hash, unsigned long long location,
  1518. int xe_index),
  1519. TP_ARGS(ino, name, name_index, hash, location, xe_index),
  1520. TP_STRUCT__entry(
  1521. __field(unsigned long long, ino)
  1522. __string(name, name)
  1523. __field(int, name_index)
  1524. __field(unsigned int, hash)
  1525. __field(unsigned long long, location)
  1526. __field(int, xe_index)
  1527. ),
  1528. TP_fast_assign(
  1529. __entry->ino = ino;
  1530. __assign_str(name, name);
  1531. __entry->name_index = name_index;
  1532. __entry->hash = hash;
  1533. __entry->location = location;
  1534. __entry->xe_index = xe_index;
  1535. ),
  1536. TP_printk("%llu %s %d %u %llu %d", __entry->ino, __get_str(name),
  1537. __entry->name_index, __entry->hash, __entry->location,
  1538. __entry->xe_index)
  1539. );
  1540. #define DEFINE_OCFS2_XATTR_FIND_EVENT(name) \
  1541. DEFINE_EVENT(ocfs2__xattr_find, name, \
  1542. TP_PROTO(unsigned long long ino, const char *name, int name_index, \
  1543. unsigned int hash, unsigned long long bucket, \
  1544. int xe_index), \
  1545. TP_ARGS(ino, name, name_index, hash, bucket, xe_index))
  1546. DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_bucket_find);
  1547. DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find);
  1548. DEFINE_OCFS2_XATTR_FIND_EVENT(ocfs2_xattr_index_block_find_rec);
  1549. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_iterate_xattr_buckets);
  1550. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_iterate_xattr_bucket);
  1551. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_cp_xattr_block_to_bucket_begin);
  1552. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cp_xattr_block_to_bucket_end);
  1553. DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block_begin);
  1554. DEFINE_OCFS2_ULL_EVENT(ocfs2_xattr_create_index_block);
  1555. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_defrag_xattr_bucket);
  1556. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_bucket_cross_cluster);
  1557. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_divide_xattr_bucket_begin);
  1558. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_divide_xattr_bucket_move);
  1559. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_cp_xattr_bucket);
  1560. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_mv_xattr_buckets);
  1561. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_adjust_xattr_cross_cluster);
  1562. DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_begin);
  1563. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_add_new_xattr_cluster);
  1564. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_add_new_xattr_cluster_insert);
  1565. DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_extend_xattr_bucket);
  1566. DEFINE_OCFS2_ULL_EVENT(ocfs2_add_new_xattr_bucket);
  1567. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_xattr_bucket_value_truncate);
  1568. DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_rm_xattr_cluster);
  1569. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_header);
  1570. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_create_empty_xattr_block);
  1571. DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_bucket);
  1572. DEFINE_OCFS2_STRING_EVENT(ocfs2_xattr_set_entry_index_block);
  1573. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_xattr_bucket_value_refcount);
  1574. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_reflink_xattr_buckets);
  1575. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_reflink_xattr_rec);
  1576. /* End of trace events for fs/ocfs2/xattr.c. */
  1577. /* Trace events for fs/ocfs2/reservations.c. */
  1578. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_insert);
  1579. DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_begin);
  1580. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_find_free_bits_end);
  1581. TRACE_EVENT(ocfs2_resv_find_window_begin,
  1582. TP_PROTO(unsigned int r_start, unsigned int r_end, unsigned int goal,
  1583. unsigned int wanted, int empty_root),
  1584. TP_ARGS(r_start, r_end, goal, wanted, empty_root),
  1585. TP_STRUCT__entry(
  1586. __field(unsigned int, r_start)
  1587. __field(unsigned int, r_end)
  1588. __field(unsigned int, goal)
  1589. __field(unsigned int, wanted)
  1590. __field(int, empty_root)
  1591. ),
  1592. TP_fast_assign(
  1593. __entry->r_start = r_start;
  1594. __entry->r_end = r_end;
  1595. __entry->goal = goal;
  1596. __entry->wanted = wanted;
  1597. __entry->empty_root = empty_root;
  1598. ),
  1599. TP_printk("%u %u %u %u %d", __entry->r_start, __entry->r_end,
  1600. __entry->goal, __entry->wanted, __entry->empty_root)
  1601. );
  1602. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resv_find_window_prev);
  1603. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_resv_find_window_next);
  1604. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_cannibalize_resv_begin);
  1605. TRACE_EVENT(ocfs2_cannibalize_resv_end,
  1606. TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
  1607. unsigned int last_start, unsigned int last_len),
  1608. TP_ARGS(start, end, len, last_start, last_len),
  1609. TP_STRUCT__entry(
  1610. __field(unsigned int, start)
  1611. __field(unsigned int, end)
  1612. __field(unsigned int, len)
  1613. __field(unsigned int, last_start)
  1614. __field(unsigned int, last_len)
  1615. ),
  1616. TP_fast_assign(
  1617. __entry->start = start;
  1618. __entry->end = end;
  1619. __entry->len = len;
  1620. __entry->last_start = last_start;
  1621. __entry->last_len = last_len;
  1622. ),
  1623. TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
  1624. __entry->len, __entry->last_start, __entry->last_len)
  1625. );
  1626. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_resmap_resv_bits);
  1627. TRACE_EVENT(ocfs2_resmap_claimed_bits_begin,
  1628. TP_PROTO(unsigned int cstart, unsigned int cend, unsigned int clen,
  1629. unsigned int r_start, unsigned int r_end, unsigned int r_len,
  1630. unsigned int last_start, unsigned int last_len),
  1631. TP_ARGS(cstart, cend, clen, r_start, r_end,
  1632. r_len, last_start, last_len),
  1633. TP_STRUCT__entry(
  1634. __field(unsigned int, cstart)
  1635. __field(unsigned int, cend)
  1636. __field(unsigned int, clen)
  1637. __field(unsigned int, r_start)
  1638. __field(unsigned int, r_end)
  1639. __field(unsigned int, r_len)
  1640. __field(unsigned int, last_start)
  1641. __field(unsigned int, last_len)
  1642. ),
  1643. TP_fast_assign(
  1644. __entry->cstart = cstart;
  1645. __entry->cend = cend;
  1646. __entry->clen = clen;
  1647. __entry->r_start = r_start;
  1648. __entry->r_end = r_end;
  1649. __entry->r_len = r_len;
  1650. __entry->last_start = last_start;
  1651. __entry->last_len = last_len;
  1652. ),
  1653. TP_printk("%u %u %u %u %u %u %u %u",
  1654. __entry->cstart, __entry->cend, __entry->clen,
  1655. __entry->r_start, __entry->r_end, __entry->r_len,
  1656. __entry->last_start, __entry->last_len)
  1657. );
  1658. TRACE_EVENT(ocfs2_resmap_claimed_bits_end,
  1659. TP_PROTO(unsigned int start, unsigned int end, unsigned int len,
  1660. unsigned int last_start, unsigned int last_len),
  1661. TP_ARGS(start, end, len, last_start, last_len),
  1662. TP_STRUCT__entry(
  1663. __field(unsigned int, start)
  1664. __field(unsigned int, end)
  1665. __field(unsigned int, len)
  1666. __field(unsigned int, last_start)
  1667. __field(unsigned int, last_len)
  1668. ),
  1669. TP_fast_assign(
  1670. __entry->start = start;
  1671. __entry->end = end;
  1672. __entry->len = len;
  1673. __entry->last_start = last_start;
  1674. __entry->last_len = last_len;
  1675. ),
  1676. TP_printk("%u %u %u %u %u", __entry->start, __entry->end,
  1677. __entry->len, __entry->last_start, __entry->last_len)
  1678. );
  1679. /* End of trace events for fs/ocfs2/reservations.c. */
  1680. /* Trace events for fs/ocfs2/quota_local.c. */
  1681. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_recover_local_quota_file);
  1682. DEFINE_OCFS2_INT_EVENT(ocfs2_finish_quota_recovery);
  1683. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(olq_set_dquot);
  1684. /* End of trace events for fs/ocfs2/quota_local.c. */
  1685. /* Trace events for fs/ocfs2/quota_global.c. */
  1686. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_quota_block);
  1687. TRACE_EVENT(ocfs2_sync_dquot,
  1688. TP_PROTO(unsigned int dq_id, long long dqb_curspace,
  1689. long long spacechange, long long curinodes,
  1690. long long inodechange),
  1691. TP_ARGS(dq_id, dqb_curspace, spacechange, curinodes, inodechange),
  1692. TP_STRUCT__entry(
  1693. __field(unsigned int, dq_id)
  1694. __field(long long, dqb_curspace)
  1695. __field(long long, spacechange)
  1696. __field(long long, curinodes)
  1697. __field(long long, inodechange)
  1698. ),
  1699. TP_fast_assign(
  1700. __entry->dq_id = dq_id;
  1701. __entry->dqb_curspace = dqb_curspace;
  1702. __entry->spacechange = spacechange;
  1703. __entry->curinodes = curinodes;
  1704. __entry->inodechange = inodechange;
  1705. ),
  1706. TP_printk("%u %lld %lld %lld %lld", __entry->dq_id,
  1707. __entry->dqb_curspace, __entry->spacechange,
  1708. __entry->curinodes, __entry->inodechange)
  1709. );
  1710. TRACE_EVENT(ocfs2_sync_dquot_helper,
  1711. TP_PROTO(unsigned int dq_id, unsigned int dq_type, unsigned long type,
  1712. const char *s_id),
  1713. TP_ARGS(dq_id, dq_type, type, s_id),
  1714. TP_STRUCT__entry(
  1715. __field(unsigned int, dq_id)
  1716. __field(unsigned int, dq_type)
  1717. __field(unsigned long, type)
  1718. __string(s_id, s_id)
  1719. ),
  1720. TP_fast_assign(
  1721. __entry->dq_id = dq_id;
  1722. __entry->dq_type = dq_type;
  1723. __entry->type = type;
  1724. __assign_str(s_id, s_id);
  1725. ),
  1726. TP_printk("%u %u %lu %s", __entry->dq_id, __entry->dq_type,
  1727. __entry->type, __get_str(s_id))
  1728. );
  1729. DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_write_dquot);
  1730. DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_release_dquot);
  1731. DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_acquire_dquot);
  1732. DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_get_next_id);
  1733. DEFINE_OCFS2_UINT_INT_EVENT(ocfs2_mark_dquot_dirty);
  1734. /* End of trace events for fs/ocfs2/quota_global.c. */
  1735. /* Trace events for fs/ocfs2/dir.c. */
  1736. DEFINE_OCFS2_INT_EVENT(ocfs2_search_dirblock);
  1737. DEFINE_OCFS2_ULL_EVENT(ocfs2_validate_dir_block);
  1738. DEFINE_OCFS2_POINTER_EVENT(ocfs2_find_entry_el);
  1739. TRACE_EVENT(ocfs2_dx_dir_search,
  1740. TP_PROTO(unsigned long long ino, int namelen, const char *name,
  1741. unsigned int major_hash, unsigned int minor_hash,
  1742. unsigned long long blkno),
  1743. TP_ARGS(ino, namelen, name, major_hash, minor_hash, blkno),
  1744. TP_STRUCT__entry(
  1745. __field(unsigned long long, ino)
  1746. __field(int, namelen)
  1747. __string(name, name)
  1748. __field(unsigned int, major_hash)
  1749. __field(unsigned int,minor_hash)
  1750. __field(unsigned long long, blkno)
  1751. ),
  1752. TP_fast_assign(
  1753. __entry->ino = ino;
  1754. __entry->namelen = namelen;
  1755. __assign_str(name, name);
  1756. __entry->major_hash = major_hash;
  1757. __entry->minor_hash = minor_hash;
  1758. __entry->blkno = blkno;
  1759. ),
  1760. TP_printk("%llu %.*s %u %u %llu", __entry->ino,
  1761. __entry->namelen, __get_str(name),
  1762. __entry->major_hash, __entry->minor_hash, __entry->blkno)
  1763. );
  1764. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_dx_dir_search_leaf_info);
  1765. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_delete_entry_dx);
  1766. DEFINE_OCFS2_ULL_EVENT(ocfs2_readdir);
  1767. TRACE_EVENT(ocfs2_find_files_on_disk,
  1768. TP_PROTO(int namelen, const char *name, void *blkno,
  1769. unsigned long long dir),
  1770. TP_ARGS(namelen, name, blkno, dir),
  1771. TP_STRUCT__entry(
  1772. __field(int, namelen)
  1773. __string(name, name)
  1774. __field(void *, blkno)
  1775. __field(unsigned long long, dir)
  1776. ),
  1777. TP_fast_assign(
  1778. __entry->namelen = namelen;
  1779. __assign_str(name, name);
  1780. __entry->blkno = blkno;
  1781. __entry->dir = dir;
  1782. ),
  1783. TP_printk("%.*s %p %llu", __entry->namelen, __get_str(name),
  1784. __entry->blkno, __entry->dir)
  1785. );
  1786. TRACE_EVENT(ocfs2_check_dir_for_entry,
  1787. TP_PROTO(unsigned long long dir, int namelen, const char *name),
  1788. TP_ARGS(dir, namelen, name),
  1789. TP_STRUCT__entry(
  1790. __field(unsigned long long, dir)
  1791. __field(int, namelen)
  1792. __string(name, name)
  1793. ),
  1794. TP_fast_assign(
  1795. __entry->dir = dir;
  1796. __entry->namelen = namelen;
  1797. __assign_str(name, name);
  1798. ),
  1799. TP_printk("%llu %.*s", __entry->dir,
  1800. __entry->namelen, __get_str(name))
  1801. );
  1802. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_dx_dir_attach_index);
  1803. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_format_cluster);
  1804. TRACE_EVENT(ocfs2_dx_dir_index_root_block,
  1805. TP_PROTO(unsigned long long dir,
  1806. unsigned int major_hash, unsigned int minor_hash,
  1807. int namelen, const char *name, unsigned int num_used),
  1808. TP_ARGS(dir, major_hash, minor_hash, namelen, name, num_used),
  1809. TP_STRUCT__entry(
  1810. __field(unsigned long long, dir)
  1811. __field(unsigned int, major_hash)
  1812. __field(unsigned int, minor_hash)
  1813. __field(int, namelen)
  1814. __string(name, name)
  1815. __field(unsigned int, num_used)
  1816. ),
  1817. TP_fast_assign(
  1818. __entry->dir = dir;
  1819. __entry->major_hash = major_hash;
  1820. __entry->minor_hash = minor_hash;
  1821. __entry->namelen = namelen;
  1822. __assign_str(name, name);
  1823. __entry->num_used = num_used;
  1824. ),
  1825. TP_printk("%llu %x %x %.*s %u", __entry->dir,
  1826. __entry->major_hash, __entry->minor_hash,
  1827. __entry->namelen, __get_str(name), __entry->num_used)
  1828. );
  1829. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_extend_dir);
  1830. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_dx_dir_rebalance);
  1831. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_dx_dir_rebalance_split);
  1832. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_prepare_dir_for_insert);
  1833. /* End of trace events for fs/ocfs2/dir.c. */
  1834. /* Trace events for fs/ocfs2/namei.c. */
  1835. DECLARE_EVENT_CLASS(ocfs2__dentry_ops,
  1836. TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
  1837. unsigned long long dir_blkno, unsigned long long extra),
  1838. TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra),
  1839. TP_STRUCT__entry(
  1840. __field(void *, dir)
  1841. __field(void *, dentry)
  1842. __field(int, name_len)
  1843. __string(name, name)
  1844. __field(unsigned long long, dir_blkno)
  1845. __field(unsigned long long, extra)
  1846. ),
  1847. TP_fast_assign(
  1848. __entry->dir = dir;
  1849. __entry->dentry = dentry;
  1850. __entry->name_len = name_len;
  1851. __assign_str(name, name);
  1852. __entry->dir_blkno = dir_blkno;
  1853. __entry->extra = extra;
  1854. ),
  1855. TP_printk("%p %p %.*s %llu %llu", __entry->dir, __entry->dentry,
  1856. __entry->name_len, __get_str(name),
  1857. __entry->dir_blkno, __entry->extra)
  1858. );
  1859. #define DEFINE_OCFS2_DENTRY_OPS(name) \
  1860. DEFINE_EVENT(ocfs2__dentry_ops, name, \
  1861. TP_PROTO(void *dir, void *dentry, int name_len, const char *name, \
  1862. unsigned long long dir_blkno, unsigned long long extra), \
  1863. TP_ARGS(dir, dentry, name_len, name, dir_blkno, extra))
  1864. DEFINE_OCFS2_DENTRY_OPS(ocfs2_lookup);
  1865. DEFINE_OCFS2_DENTRY_OPS(ocfs2_mkdir);
  1866. DEFINE_OCFS2_DENTRY_OPS(ocfs2_create);
  1867. DEFINE_OCFS2_DENTRY_OPS(ocfs2_unlink);
  1868. DEFINE_OCFS2_DENTRY_OPS(ocfs2_symlink_create);
  1869. DEFINE_OCFS2_DENTRY_OPS(ocfs2_mv_orphaned_inode_to_new);
  1870. DEFINE_OCFS2_POINTER_EVENT(ocfs2_lookup_ret);
  1871. TRACE_EVENT(ocfs2_mknod,
  1872. TP_PROTO(void *dir, void *dentry, int name_len, const char *name,
  1873. unsigned long long dir_blkno, unsigned long dev, int mode),
  1874. TP_ARGS(dir, dentry, name_len, name, dir_blkno, dev, mode),
  1875. TP_STRUCT__entry(
  1876. __field(void *, dir)
  1877. __field(void *, dentry)
  1878. __field(int, name_len)
  1879. __string(name, name)
  1880. __field(unsigned long long, dir_blkno)
  1881. __field(unsigned long, dev)
  1882. __field(int, mode)
  1883. ),
  1884. TP_fast_assign(
  1885. __entry->dir = dir;
  1886. __entry->dentry = dentry;
  1887. __entry->name_len = name_len;
  1888. __assign_str(name, name);
  1889. __entry->dir_blkno = dir_blkno;
  1890. __entry->dev = dev;
  1891. __entry->mode = mode;
  1892. ),
  1893. TP_printk("%p %p %.*s %llu %lu %d", __entry->dir, __entry->dentry,
  1894. __entry->name_len, __get_str(name),
  1895. __entry->dir_blkno, __entry->dev, __entry->mode)
  1896. );
  1897. TRACE_EVENT(ocfs2_link,
  1898. TP_PROTO(unsigned long long ino, int old_len, const char *old_name,
  1899. int name_len, const char *name),
  1900. TP_ARGS(ino, old_len, old_name, name_len, name),
  1901. TP_STRUCT__entry(
  1902. __field(unsigned long long, ino)
  1903. __field(int, old_len)
  1904. __string(old_name, old_name)
  1905. __field(int, name_len)
  1906. __string(name, name)
  1907. ),
  1908. TP_fast_assign(
  1909. __entry->ino = ino;
  1910. __entry->old_len = old_len;
  1911. __assign_str(old_name, old_name);
  1912. __entry->name_len = name_len;
  1913. __assign_str(name, name);
  1914. ),
  1915. TP_printk("%llu %.*s %.*s", __entry->ino,
  1916. __entry->old_len, __get_str(old_name),
  1917. __entry->name_len, __get_str(name))
  1918. );
  1919. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_unlink_noent);
  1920. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock);
  1921. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_double_lock_end);
  1922. TRACE_EVENT(ocfs2_rename,
  1923. TP_PROTO(void *old_dir, void *old_dentry,
  1924. void *new_dir, void *new_dentry,
  1925. int old_len, const char *old_name,
  1926. int new_len, const char *new_name),
  1927. TP_ARGS(old_dir, old_dentry, new_dir, new_dentry,
  1928. old_len, old_name, new_len, new_name),
  1929. TP_STRUCT__entry(
  1930. __field(void *, old_dir)
  1931. __field(void *, old_dentry)
  1932. __field(void *, new_dir)
  1933. __field(void *, new_dentry)
  1934. __field(int, old_len)
  1935. __string(old_name, old_name)
  1936. __field(int, new_len)
  1937. __string(new_name, new_name)
  1938. ),
  1939. TP_fast_assign(
  1940. __entry->old_dir = old_dir;
  1941. __entry->old_dentry = old_dentry;
  1942. __entry->new_dir = new_dir;
  1943. __entry->new_dentry = new_dentry;
  1944. __entry->old_len = old_len;
  1945. __assign_str(old_name, old_name);
  1946. __entry->new_len = new_len;
  1947. __assign_str(new_name, new_name);
  1948. ),
  1949. TP_printk("%p %p %p %p %.*s %.*s",
  1950. __entry->old_dir, __entry->old_dentry,
  1951. __entry->new_dir, __entry->new_dentry,
  1952. __entry->old_len, __get_str(old_name),
  1953. __entry->new_len, __get_str(new_name))
  1954. );
  1955. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_rename_not_permitted);
  1956. TRACE_EVENT(ocfs2_rename_target_exists,
  1957. TP_PROTO(int new_len, const char *new_name),
  1958. TP_ARGS(new_len, new_name),
  1959. TP_STRUCT__entry(
  1960. __field(int, new_len)
  1961. __string(new_name, new_name)
  1962. ),
  1963. TP_fast_assign(
  1964. __entry->new_len = new_len;
  1965. __assign_str(new_name, new_name);
  1966. ),
  1967. TP_printk("%.*s", __entry->new_len, __get_str(new_name))
  1968. );
  1969. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_rename_disagree);
  1970. TRACE_EVENT(ocfs2_rename_over_existing,
  1971. TP_PROTO(unsigned long long new_blkno, void *new_bh,
  1972. unsigned long long newdi_blkno),
  1973. TP_ARGS(new_blkno, new_bh, newdi_blkno),
  1974. TP_STRUCT__entry(
  1975. __field(unsigned long long, new_blkno)
  1976. __field(void *, new_bh)
  1977. __field(unsigned long long, newdi_blkno)
  1978. ),
  1979. TP_fast_assign(
  1980. __entry->new_blkno = new_blkno;
  1981. __entry->new_bh = new_bh;
  1982. __entry->newdi_blkno = newdi_blkno;
  1983. ),
  1984. TP_printk("%llu %p %llu", __entry->new_blkno, __entry->new_bh,
  1985. __entry->newdi_blkno)
  1986. );
  1987. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_create_symlink_data);
  1988. TRACE_EVENT(ocfs2_symlink_begin,
  1989. TP_PROTO(void *dir, void *dentry, const char *symname,
  1990. int len, const char *name),
  1991. TP_ARGS(dir, dentry, symname, len, name),
  1992. TP_STRUCT__entry(
  1993. __field(void *, dir)
  1994. __field(void *, dentry)
  1995. __field(const char *, symname)
  1996. __field(int, len)
  1997. __string(name, name)
  1998. ),
  1999. TP_fast_assign(
  2000. __entry->dir = dir;
  2001. __entry->dentry = dentry;
  2002. __entry->symname = symname;
  2003. __entry->len = len;
  2004. __assign_str(name, name);
  2005. ),
  2006. TP_printk("%p %p %s %.*s", __entry->dir, __entry->dentry,
  2007. __entry->symname, __entry->len, __get_str(name))
  2008. );
  2009. TRACE_EVENT(ocfs2_blkno_stringify,
  2010. TP_PROTO(unsigned long long blkno, const char *name, int namelen),
  2011. TP_ARGS(blkno, name, namelen),
  2012. TP_STRUCT__entry(
  2013. __field(unsigned long long, blkno)
  2014. __string(name, name)
  2015. __field(int, namelen)
  2016. ),
  2017. TP_fast_assign(
  2018. __entry->blkno = blkno;
  2019. __assign_str(name, name);
  2020. __entry->namelen = namelen;
  2021. ),
  2022. TP_printk("%llu %s %d", __entry->blkno, __get_str(name),
  2023. __entry->namelen)
  2024. );
  2025. DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_add_begin);
  2026. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_orphan_add_end);
  2027. TRACE_EVENT(ocfs2_orphan_del,
  2028. TP_PROTO(unsigned long long dir, const char *name, int namelen),
  2029. TP_ARGS(dir, name, namelen),
  2030. TP_STRUCT__entry(
  2031. __field(unsigned long long, dir)
  2032. __string(name, name)
  2033. __field(int, namelen)
  2034. ),
  2035. TP_fast_assign(
  2036. __entry->dir = dir;
  2037. __assign_str(name, name);
  2038. __entry->namelen = namelen;
  2039. ),
  2040. TP_printk("%llu %s %d", __entry->dir, __get_str(name),
  2041. __entry->namelen)
  2042. );
  2043. /* End of trace events for fs/ocfs2/namei.c. */
  2044. /* Trace events for fs/ocfs2/dcache.c. */
  2045. TRACE_EVENT(ocfs2_dentry_revalidate,
  2046. TP_PROTO(void *dentry, int len, const char *name),
  2047. TP_ARGS(dentry, len, name),
  2048. TP_STRUCT__entry(
  2049. __field(void *, dentry)
  2050. __field(int, len)
  2051. __string(name, name)
  2052. ),
  2053. TP_fast_assign(
  2054. __entry->dentry = dentry;
  2055. __entry->len = len;
  2056. __assign_str(name, name);
  2057. ),
  2058. TP_printk("%p %.*s", __entry->dentry, __entry->len, __get_str(name))
  2059. );
  2060. TRACE_EVENT(ocfs2_dentry_revalidate_negative,
  2061. TP_PROTO(int len, const char *name, unsigned long pgen,
  2062. unsigned long gen),
  2063. TP_ARGS(len, name, pgen, gen),
  2064. TP_STRUCT__entry(
  2065. __field(int, len)
  2066. __string(name, name)
  2067. __field(unsigned long, pgen)
  2068. __field(unsigned long, gen)
  2069. ),
  2070. TP_fast_assign(
  2071. __entry->len = len;
  2072. __assign_str(name, name);
  2073. __entry->pgen = pgen;
  2074. __entry->gen = gen;
  2075. ),
  2076. TP_printk("%.*s %lu %lu", __entry->len, __get_str(name),
  2077. __entry->pgen, __entry->gen)
  2078. );
  2079. DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_delete);
  2080. DEFINE_OCFS2_ULL_INT_EVENT(ocfs2_dentry_revalidate_orphaned);
  2081. DEFINE_OCFS2_ULL_EVENT(ocfs2_dentry_revalidate_nofsdata);
  2082. DEFINE_OCFS2_INT_EVENT(ocfs2_dentry_revalidate_ret);
  2083. TRACE_EVENT(ocfs2_find_local_alias,
  2084. TP_PROTO(int len, const char *name),
  2085. TP_ARGS(len, name),
  2086. TP_STRUCT__entry(
  2087. __field(int, len)
  2088. __string(name, name)
  2089. ),
  2090. TP_fast_assign(
  2091. __entry->len = len;
  2092. __assign_str(name, name);
  2093. ),
  2094. TP_printk("%.*s", __entry->len, __get_str(name))
  2095. );
  2096. TRACE_EVENT(ocfs2_dentry_attach_lock,
  2097. TP_PROTO(int len, const char *name,
  2098. unsigned long long parent, void *fsdata),
  2099. TP_ARGS(len, name, parent, fsdata),
  2100. TP_STRUCT__entry(
  2101. __field(int, len)
  2102. __string(name, name)
  2103. __field(unsigned long long, parent)
  2104. __field(void *, fsdata)
  2105. ),
  2106. TP_fast_assign(
  2107. __entry->len = len;
  2108. __assign_str(name, name);
  2109. __entry->parent = parent;
  2110. __entry->fsdata = fsdata;
  2111. ),
  2112. TP_printk("%.*s %llu %p", __entry->len, __get_str(name),
  2113. __entry->parent, __entry->fsdata)
  2114. );
  2115. TRACE_EVENT(ocfs2_dentry_attach_lock_found,
  2116. TP_PROTO(const char *name, unsigned long long parent,
  2117. unsigned long long ino),
  2118. TP_ARGS(name, parent, ino),
  2119. TP_STRUCT__entry(
  2120. __string(name, name)
  2121. __field(unsigned long long, parent)
  2122. __field(unsigned long long, ino)
  2123. ),
  2124. TP_fast_assign(
  2125. __assign_str(name, name);
  2126. __entry->parent = parent;
  2127. __entry->ino = ino;
  2128. ),
  2129. TP_printk("%s %llu %llu", __get_str(name), __entry->parent, __entry->ino)
  2130. );
  2131. /* End of trace events for fs/ocfs2/dcache.c. */
  2132. /* Trace events for fs/ocfs2/export.c. */
  2133. TRACE_EVENT(ocfs2_get_dentry_begin,
  2134. TP_PROTO(void *sb, void *handle, unsigned long long blkno),
  2135. TP_ARGS(sb, handle, blkno),
  2136. TP_STRUCT__entry(
  2137. __field(void *, sb)
  2138. __field(void *, handle)
  2139. __field(unsigned long long, blkno)
  2140. ),
  2141. TP_fast_assign(
  2142. __entry->sb = sb;
  2143. __entry->handle = handle;
  2144. __entry->blkno = blkno;
  2145. ),
  2146. TP_printk("%p %p %llu", __entry->sb, __entry->handle, __entry->blkno)
  2147. );
  2148. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_get_dentry_test_bit);
  2149. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_get_dentry_stale);
  2150. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_get_dentry_generation);
  2151. DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_dentry_end);
  2152. TRACE_EVENT(ocfs2_get_parent,
  2153. TP_PROTO(void *child, int len, const char *name,
  2154. unsigned long long ino),
  2155. TP_ARGS(child, len, name, ino),
  2156. TP_STRUCT__entry(
  2157. __field(void *, child)
  2158. __field(int, len)
  2159. __string(name, name)
  2160. __field(unsigned long long, ino)
  2161. ),
  2162. TP_fast_assign(
  2163. __entry->child = child;
  2164. __entry->len = len;
  2165. __assign_str(name, name);
  2166. __entry->ino = ino;
  2167. ),
  2168. TP_printk("%p %.*s %llu", __entry->child, __entry->len,
  2169. __get_str(name), __entry->ino)
  2170. );
  2171. DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_parent_end);
  2172. TRACE_EVENT(ocfs2_encode_fh_begin,
  2173. TP_PROTO(void *dentry, int name_len, const char *name,
  2174. void *fh, int len, int connectable),
  2175. TP_ARGS(dentry, name_len, name, fh, len, connectable),
  2176. TP_STRUCT__entry(
  2177. __field(void *, dentry)
  2178. __field(int, name_len)
  2179. __string(name, name)
  2180. __field(void *, fh)
  2181. __field(int, len)
  2182. __field(int, connectable)
  2183. ),
  2184. TP_fast_assign(
  2185. __entry->dentry = dentry;
  2186. __entry->name_len = name_len;
  2187. __assign_str(name, name);
  2188. __entry->fh = fh;
  2189. __entry->len = len;
  2190. __entry->connectable = connectable;
  2191. ),
  2192. TP_printk("%p %.*s %p %d %d", __entry->dentry, __entry->name_len,
  2193. __get_str(name), __entry->fh, __entry->len,
  2194. __entry->connectable)
  2195. );
  2196. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_self);
  2197. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_parent);
  2198. DEFINE_OCFS2_INT_EVENT(ocfs2_encode_fh_type);
  2199. /* End of trace events for fs/ocfs2/export.c. */
  2200. /* Trace events for fs/ocfs2/journal.c. */
  2201. DEFINE_OCFS2_UINT_EVENT(ocfs2_commit_cache_begin);
  2202. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_commit_cache_end);
  2203. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_extend_trans);
  2204. DEFINE_OCFS2_INT_EVENT(ocfs2_extend_trans_restart);
  2205. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_allocate_extend_trans);
  2206. DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_journal_access);
  2207. DEFINE_OCFS2_ULL_EVENT(ocfs2_journal_dirty);
  2208. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_journal_init);
  2209. DEFINE_OCFS2_UINT_EVENT(ocfs2_journal_init_maxlen);
  2210. DEFINE_OCFS2_INT_EVENT(ocfs2_journal_shutdown);
  2211. DEFINE_OCFS2_POINTER_EVENT(ocfs2_journal_shutdown_wait);
  2212. DEFINE_OCFS2_ULL_EVENT(ocfs2_complete_recovery);
  2213. DEFINE_OCFS2_INT_EVENT(ocfs2_complete_recovery_end);
  2214. TRACE_EVENT(ocfs2_complete_recovery_slot,
  2215. TP_PROTO(int slot, unsigned long long la_ino,
  2216. unsigned long long tl_ino, void *qrec),
  2217. TP_ARGS(slot, la_ino, tl_ino, qrec),
  2218. TP_STRUCT__entry(
  2219. __field(int, slot)
  2220. __field(unsigned long long, la_ino)
  2221. __field(unsigned long long, tl_ino)
  2222. __field(void *, qrec)
  2223. ),
  2224. TP_fast_assign(
  2225. __entry->slot = slot;
  2226. __entry->la_ino = la_ino;
  2227. __entry->tl_ino = tl_ino;
  2228. __entry->qrec = qrec;
  2229. ),
  2230. TP_printk("%d %llu %llu %p", __entry->slot, __entry->la_ino,
  2231. __entry->tl_ino, __entry->qrec)
  2232. );
  2233. DEFINE_OCFS2_INT_INT_EVENT(ocfs2_recovery_thread_node);
  2234. DEFINE_OCFS2_INT_EVENT(ocfs2_recovery_thread_end);
  2235. TRACE_EVENT(ocfs2_recovery_thread,
  2236. TP_PROTO(int node_num, int osb_node_num, int disable,
  2237. void *recovery_thread, int map_set),
  2238. TP_ARGS(node_num, osb_node_num, disable, recovery_thread, map_set),
  2239. TP_STRUCT__entry(
  2240. __field(int, node_num)
  2241. __field(int, osb_node_num)
  2242. __field(int,disable)
  2243. __field(void *, recovery_thread)
  2244. __field(int,map_set)
  2245. ),
  2246. TP_fast_assign(
  2247. __entry->node_num = node_num;
  2248. __entry->osb_node_num = osb_node_num;
  2249. __entry->disable = disable;
  2250. __entry->recovery_thread = recovery_thread;
  2251. __entry->map_set = map_set;
  2252. ),
  2253. TP_printk("%d %d %d %p %d", __entry->node_num,
  2254. __entry->osb_node_num, __entry->disable,
  2255. __entry->recovery_thread, __entry->map_set)
  2256. );
  2257. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_replay_journal_recovered);
  2258. DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_lock_err);
  2259. DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_skip);
  2260. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_recover_node);
  2261. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_recover_node_skip);
  2262. DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_mark_dead_nodes);
  2263. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_begin);
  2264. DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_end);
  2265. DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_filldir);
  2266. DEFINE_OCFS2_INT_EVENT(ocfs2_recover_orphans);
  2267. DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput);
  2268. DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);
  2269. /* End of trace events for fs/ocfs2/journal.c. */
  2270. /* Trace events for fs/ocfs2/buffer_head_io.c. */
  2271. DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync);
  2272. DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd);
  2273. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_read_blocks_from_disk);
  2274. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh);
  2275. DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end);
  2276. TRACE_EVENT(ocfs2_write_block,
  2277. TP_PROTO(unsigned long long block, void *ci),
  2278. TP_ARGS(block, ci),
  2279. TP_STRUCT__entry(
  2280. __field(unsigned long long, block)
  2281. __field(void *, ci)
  2282. ),
  2283. TP_fast_assign(
  2284. __entry->block = block;
  2285. __entry->ci = ci;
  2286. ),
  2287. TP_printk("%llu %p", __entry->block, __entry->ci)
  2288. );
  2289. TRACE_EVENT(ocfs2_read_blocks_begin,
  2290. TP_PROTO(void *ci, unsigned long long block,
  2291. unsigned int nr, int flags),
  2292. TP_ARGS(ci, block, nr, flags),
  2293. TP_STRUCT__entry(
  2294. __field(void *, ci)
  2295. __field(unsigned long long, block)
  2296. __field(unsigned int, nr)
  2297. __field(int, flags)
  2298. ),
  2299. TP_fast_assign(
  2300. __entry->ci = ci;
  2301. __entry->block = block;
  2302. __entry->nr = nr;
  2303. __entry->flags = flags;
  2304. ),
  2305. TP_printk("%p %llu %u %d", __entry->ci, __entry->block,
  2306. __entry->nr, __entry->flags)
  2307. );
  2308. /* End of trace events for fs/ocfs2/buffer_head_io.c. */
  2309. /* Trace events for fs/ocfs2/uptodate.c. */
  2310. DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_copied_metadata_tree);
  2311. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_metadata_cache_purge);
  2312. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_buffer_cached_begin);
  2313. TRACE_EVENT(ocfs2_buffer_cached_end,
  2314. TP_PROTO(int index, void *item),
  2315. TP_ARGS(index, item),
  2316. TP_STRUCT__entry(
  2317. __field(int, index)
  2318. __field(void *, item)
  2319. ),
  2320. TP_fast_assign(
  2321. __entry->index = index;
  2322. __entry->item = item;
  2323. ),
  2324. TP_printk("%d %p", __entry->index, __entry->item)
  2325. );
  2326. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_append_cache_array);
  2327. DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_insert_cache_tree);
  2328. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_expand_cache);
  2329. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_set_buffer_uptodate);
  2330. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_set_buffer_uptodate_begin);
  2331. DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_remove_metadata_array);
  2332. DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);
  2333. DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_remove_block_from_cache);
  2334. /* End of trace events for fs/ocfs2/uptodate.c. */
  2335. #endif /* _TRACE_OCFS2_H */
  2336. /* This part must be outside protection */
  2337. #undef TRACE_INCLUDE_PATH
  2338. #define TRACE_INCLUDE_PATH .
  2339. #define TRACE_INCLUDE_FILE ocfs2_trace
  2340. #include <trace/define_trace.h>