ocfs2_trace.h 76 KB

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