ocfs2_trace.h 76 KB

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