heap_4.c.069i.profile_estimate 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. Histogram:
  2. vPortGetHeapStats (struct HeapStats_t * pxHeapStats)
  3. {
  4. size_t xMinSize;
  5. size_t xMaxSize;
  6. size_t xBlocks;
  7. struct BlockLink_t * pxBlock;
  8. unsigned int _1;
  9. struct BlockLink_t * pxEnd.26_3;
  10. unsigned int xFreeBytesRemaining.27_4;
  11. unsigned int xNumberOfSuccessfulAllocations.28_5;
  12. unsigned int xNumberOfSuccessfulFrees.29_6;
  13. unsigned int xMinimumEverFreeBytesRemaining.30_7;
  14. <bb 2> [local count: 168730857]:
  15. # DEBUG BEGIN_STMT
  16. # DEBUG BEGIN_STMT
  17. # DEBUG xBlocks => 0
  18. # DEBUG xMaxSize => 0
  19. # DEBUG xMinSize => 4294967295
  20. # DEBUG BEGIN_STMT
  21. vTaskSuspendAll ();
  22. # DEBUG BEGIN_STMT
  23. pxBlock_17 = xStart.pxNextFreeBlock;
  24. # DEBUG pxBlock => pxBlock_17
  25. # DEBUG BEGIN_STMT
  26. if (pxBlock_17 != 0B)
  27. goto <bb 5>; [70.00%]
  28. else
  29. goto <bb 4>; [30.00%]
  30. <bb 5> [local count: 118111600]:
  31. <bb 3> [local count: 1073741824]:
  32. # pxBlock_8 = PHI <pxBlock_17(5), pxBlock_20(6)>
  33. # xBlocks_9 = PHI <0(5), xBlocks_18(6)>
  34. # xMaxSize_11 = PHI <0(5), xMaxSize_2(6)>
  35. # xMinSize_13 = PHI <4294967295(5), xMinSize_19(6)>
  36. # DEBUG xMinSize => xMinSize_13
  37. # DEBUG xMaxSize => xMaxSize_11
  38. # DEBUG xBlocks => xBlocks_9
  39. # DEBUG pxBlock => pxBlock_8
  40. # DEBUG BEGIN_STMT
  41. # DEBUG BEGIN_STMT
  42. xBlocks_18 = xBlocks_9 + 1;
  43. # DEBUG xBlocks => xBlocks_18
  44. # DEBUG BEGIN_STMT
  45. _1 = pxBlock_8->xBlockSize;
  46. xMaxSize_2 = MAX_EXPR <_1, xMaxSize_11>;
  47. # DEBUG xMaxSize => xMaxSize_2
  48. # DEBUG BEGIN_STMT
  49. xMinSize_19 = MIN_EXPR <_1, xMinSize_13>;
  50. # DEBUG xMinSize => xMinSize_19
  51. # DEBUG BEGIN_STMT
  52. pxBlock_20 = pxBlock_8->pxNextFreeBlock;
  53. # DEBUG pxBlock => pxBlock_20
  54. # DEBUG BEGIN_STMT
  55. pxEnd.26_3 = pxEnd;
  56. if (pxEnd.26_3 != pxBlock_20)
  57. goto <bb 6>; [89.00%]
  58. else
  59. goto <bb 4>; [11.00%]
  60. <bb 6> [local count: 955630225]:
  61. goto <bb 3>; [100.00%]
  62. <bb 4> [local count: 168730858]:
  63. # xBlocks_10 = PHI <0(2), xBlocks_18(3)>
  64. # xMaxSize_12 = PHI <0(2), xMaxSize_2(3)>
  65. # xMinSize_14 = PHI <4294967295(2), xMinSize_19(3)>
  66. # DEBUG xMinSize => xMinSize_14
  67. # DEBUG xMaxSize => xMaxSize_12
  68. # DEBUG xBlocks => xBlocks_10
  69. # DEBUG BEGIN_STMT
  70. xTaskResumeAll ();
  71. # DEBUG BEGIN_STMT
  72. pxHeapStats_22(D)->xSizeOfLargestFreeBlockInBytes = xMaxSize_12;
  73. # DEBUG BEGIN_STMT
  74. pxHeapStats_22(D)->xSizeOfSmallestFreeBlockInBytes = xMinSize_14;
  75. # DEBUG BEGIN_STMT
  76. pxHeapStats_22(D)->xNumberOfFreeBlocks = xBlocks_10;
  77. # DEBUG BEGIN_STMT
  78. vPortEnterCritical ();
  79. # DEBUG BEGIN_STMT
  80. xFreeBytesRemaining.27_4 = xFreeBytesRemaining;
  81. pxHeapStats_22(D)->xAvailableHeapSpaceInBytes = xFreeBytesRemaining.27_4;
  82. # DEBUG BEGIN_STMT
  83. xNumberOfSuccessfulAllocations.28_5 = xNumberOfSuccessfulAllocations;
  84. pxHeapStats_22(D)->xNumberOfSuccessfulAllocations = xNumberOfSuccessfulAllocations.28_5;
  85. # DEBUG BEGIN_STMT
  86. xNumberOfSuccessfulFrees.29_6 = xNumberOfSuccessfulFrees;
  87. pxHeapStats_22(D)->xNumberOfSuccessfulFrees = xNumberOfSuccessfulFrees.29_6;
  88. # DEBUG BEGIN_STMT
  89. xMinimumEverFreeBytesRemaining.30_7 = xMinimumEverFreeBytesRemaining;
  90. pxHeapStats_22(D)->xMinimumEverFreeBytesRemaining = xMinimumEverFreeBytesRemaining.30_7;
  91. # DEBUG BEGIN_STMT
  92. vPortExitCritical ();
  93. return;
  94. }
  95. prvInsertBlockIntoFreeList (struct BlockLink_t * pxBlockToInsert)
  96. {
  97. struct BlockLink_t * pxIterator;
  98. struct A_BLOCK_LINK * _1;
  99. unsigned int _2;
  100. uint8_t * _3;
  101. unsigned int _5;
  102. unsigned int _6;
  103. unsigned int _7;
  104. uint8_t * _8;
  105. struct BlockLink_t * pxEnd.19_9;
  106. unsigned int _10;
  107. unsigned int _11;
  108. struct A_BLOCK_LINK * _12;
  109. struct A_BLOCK_LINK * _20;
  110. <bb 2> [local count: 118111600]:
  111. # DEBUG BEGIN_STMT
  112. # DEBUG BEGIN_STMT
  113. # DEBUG BEGIN_STMT
  114. # DEBUG pxIterator => &xStart
  115. <bb 3> [local count: 1073741824]:
  116. # pxIterator_14 = PHI <&xStart(2), _1(14)>
  117. # DEBUG pxIterator => pxIterator_14
  118. # DEBUG BEGIN_STMT
  119. _1 = pxIterator_14->pxNextFreeBlock;
  120. if (_1 < pxBlockToInsert_19(D))
  121. goto <bb 14>; [89.00%]
  122. else
  123. goto <bb 4>; [11.00%]
  124. <bb 14> [local count: 955630223]:
  125. goto <bb 3>; [100.00%]
  126. <bb 4> [local count: 118111601]:
  127. # _20 = PHI <_1(3)>
  128. # pxIterator_4 = PHI <pxIterator_14(3)>
  129. # DEBUG BEGIN_STMT
  130. # DEBUG puc => pxIterator_4
  131. # DEBUG BEGIN_STMT
  132. _2 = pxIterator_4->xBlockSize;
  133. _3 = pxIterator_4 + _2;
  134. if (_3 == pxBlockToInsert_19(D))
  135. goto <bb 5>; [30.00%]
  136. else
  137. goto <bb 6>; [70.00%]
  138. <bb 5> [local count: 35433480]:
  139. # DEBUG BEGIN_STMT
  140. _5 = pxBlockToInsert_19(D)->xBlockSize;
  141. _6 = _2 + _5;
  142. pxIterator_4->xBlockSize = _6;
  143. # DEBUG BEGIN_STMT
  144. # DEBUG pxBlockToInsert => pxIterator_4
  145. <bb 6> [local count: 118111601]:
  146. # pxBlockToInsert_13 = PHI <pxBlockToInsert_19(D)(4), pxIterator_4(5)>
  147. # DEBUG pxBlockToInsert => pxBlockToInsert_13
  148. # DEBUG BEGIN_STMT
  149. # DEBUG BEGIN_STMT
  150. # DEBUG puc => pxBlockToInsert_13
  151. # DEBUG BEGIN_STMT
  152. _7 = pxBlockToInsert_13->xBlockSize;
  153. _8 = pxBlockToInsert_13 + _7;
  154. if (_8 == _20)
  155. goto <bb 7>; [30.00%]
  156. else
  157. goto <bb 10>; [70.00%]
  158. <bb 7> [local count: 35433480]:
  159. # DEBUG BEGIN_STMT
  160. pxEnd.19_9 = pxEnd;
  161. if (pxEnd.19_9 != _20)
  162. goto <bb 8>; [70.00%]
  163. else
  164. goto <bb 9>; [30.00%]
  165. <bb 8> [local count: 24803436]:
  166. # DEBUG BEGIN_STMT
  167. _10 = _20->xBlockSize;
  168. _11 = _7 + _10;
  169. pxBlockToInsert_13->xBlockSize = _11;
  170. # DEBUG BEGIN_STMT
  171. _12 = _20->pxNextFreeBlock;
  172. pxBlockToInsert_13->pxNextFreeBlock = _12;
  173. goto <bb 11>; [100.00%]
  174. <bb 9> [local count: 10630044]:
  175. # DEBUG BEGIN_STMT
  176. pxBlockToInsert_13->pxNextFreeBlock = pxEnd.19_9;
  177. goto <bb 11>; [100.00%]
  178. <bb 10> [local count: 82678120]:
  179. # DEBUG BEGIN_STMT
  180. pxBlockToInsert_13->pxNextFreeBlock = _20;
  181. <bb 11> [local count: 118111601]:
  182. # DEBUG BEGIN_STMT
  183. if (pxIterator_4 != pxBlockToInsert_13)
  184. goto <bb 12>; [70.00%]
  185. else
  186. goto <bb 13>; [30.00%]
  187. <bb 12> [local count: 82678120]:
  188. # DEBUG BEGIN_STMT
  189. pxIterator_4->pxNextFreeBlock = pxBlockToInsert_13;
  190. <bb 13> [local count: 118111601]:
  191. # DEBUG BEGIN_STMT
  192. return;
  193. }
  194. prvHeapInit ()
  195. {
  196. size_t xTotalHeapSize;
  197. size_t uxAddress;
  198. uint8_t * pucAlignedHeap;
  199. unsigned int _1;
  200. unsigned int _2;
  201. struct BlockLink_t * uxAddress.14_3;
  202. unsigned int _4;
  203. <bb 2> [local count: 1073741824]:
  204. # DEBUG BEGIN_STMT
  205. # DEBUG BEGIN_STMT
  206. # DEBUG BEGIN_STMT
  207. # DEBUG BEGIN_STMT
  208. # DEBUG xTotalHeapSize => 8192
  209. # DEBUG BEGIN_STMT
  210. uxAddress_7 = (size_t) &ucHeap;
  211. # DEBUG uxAddress => uxAddress_7
  212. # DEBUG BEGIN_STMT
  213. _1 = uxAddress_7 & 7;
  214. if (_1 != 0)
  215. goto <bb 3>; [50.00%]
  216. else
  217. goto <bb 4>; [50.00%]
  218. <bb 3> [local count: 536870913]:
  219. # DEBUG BEGIN_STMT
  220. uxAddress_8 = uxAddress_7 + 7;
  221. # DEBUG uxAddress => uxAddress_8
  222. # DEBUG BEGIN_STMT
  223. uxAddress_9 = uxAddress_8 & 4294967288;
  224. # DEBUG uxAddress => uxAddress_9
  225. # DEBUG BEGIN_STMT
  226. _2 = 8192 - uxAddress_9;
  227. xTotalHeapSize_10 = _2 + uxAddress_7;
  228. # DEBUG xTotalHeapSize => xTotalHeapSize_10
  229. <bb 4> [local count: 1073741824]:
  230. # uxAddress_5 = PHI <uxAddress_7(2), uxAddress_9(3)>
  231. # xTotalHeapSize_6 = PHI <8192(2), xTotalHeapSize_10(3)>
  232. # DEBUG xTotalHeapSize => xTotalHeapSize_6
  233. # DEBUG uxAddress => uxAddress_5
  234. # DEBUG BEGIN_STMT
  235. pucAlignedHeap_11 = (uint8_t *) uxAddress_5;
  236. # DEBUG pucAlignedHeap => pucAlignedHeap_11
  237. # DEBUG BEGIN_STMT
  238. xStart.pxNextFreeBlock = pucAlignedHeap_11;
  239. # DEBUG BEGIN_STMT
  240. xStart.xBlockSize = 0;
  241. # DEBUG BEGIN_STMT
  242. uxAddress_15 = uxAddress_5 + xTotalHeapSize_6;
  243. # DEBUG uxAddress => uxAddress_15
  244. # DEBUG BEGIN_STMT
  245. uxAddress_16 = uxAddress_15 + 4294967288;
  246. # DEBUG uxAddress => uxAddress_16
  247. # DEBUG BEGIN_STMT
  248. uxAddress_17 = uxAddress_16 & 4294967288;
  249. # DEBUG uxAddress => uxAddress_17
  250. # DEBUG BEGIN_STMT
  251. uxAddress.14_3 = (struct BlockLink_t *) uxAddress_17;
  252. pxEnd = uxAddress.14_3;
  253. # DEBUG BEGIN_STMT
  254. uxAddress.14_3->xBlockSize = 0;
  255. # DEBUG BEGIN_STMT
  256. uxAddress.14_3->pxNextFreeBlock = 0B;
  257. # DEBUG BEGIN_STMT
  258. # DEBUG pxFirstFreeBlock => pucAlignedHeap_11
  259. # DEBUG BEGIN_STMT
  260. _4 = uxAddress_17 - uxAddress_5;
  261. MEM[(struct BlockLink_t *)pucAlignedHeap_11].xBlockSize = _4;
  262. # DEBUG BEGIN_STMT
  263. MEM[(struct BlockLink_t *)pucAlignedHeap_11].pxNextFreeBlock = uxAddress.14_3;
  264. # DEBUG BEGIN_STMT
  265. xMinimumEverFreeBytesRemaining = _4;
  266. # DEBUG BEGIN_STMT
  267. xFreeBytesRemaining = _4;
  268. # DEBUG BEGIN_STMT
  269. xBlockAllocatedBit = 2147483648;
  270. return;
  271. }
  272. vPortInitialiseBlocks ()
  273. {
  274. <bb 2> [local count: 1073741824]:
  275. # DEBUG BEGIN_STMT
  276. return;
  277. }
  278. xPortGetMinimumEverFreeHeapSize ()
  279. {
  280. size_t _2;
  281. <bb 2> [local count: 1073741824]:
  282. # DEBUG BEGIN_STMT
  283. _2 = xMinimumEverFreeBytesRemaining;
  284. return _2;
  285. }
  286. xPortGetFreeHeapSize ()
  287. {
  288. size_t _2;
  289. <bb 2> [local count: 1073741824]:
  290. # DEBUG BEGIN_STMT
  291. _2 = xFreeBytesRemaining;
  292. return _2;
  293. }
  294. vPortFree (void * pv)
  295. {
  296. uint32_t ulNewBASEPRI;
  297. uint32_t ulNewBASEPRI;
  298. uint8_t * puc;
  299. unsigned int _1;
  300. unsigned int xBlockAllocatedBit.21_2;
  301. unsigned int _3;
  302. struct A_BLOCK_LINK * _4;
  303. unsigned int _5;
  304. unsigned int _6;
  305. unsigned int _7;
  306. unsigned int xFreeBytesRemaining.24_8;
  307. unsigned int _9;
  308. unsigned int xNumberOfSuccessfulFrees.25_10;
  309. unsigned int _11;
  310. <bb 2> [local count: 306783]:
  311. # DEBUG BEGIN_STMT
  312. # DEBUG puc => pv_13(D)
  313. # DEBUG BEGIN_STMT
  314. # DEBUG BEGIN_STMT
  315. if (pv_13(D) != 0B)
  316. goto <bb 3>; [70.00%]
  317. else
  318. goto <bb 10>; [30.00%]
  319. <bb 3> [local count: 214748]:
  320. # DEBUG BEGIN_STMT
  321. puc_15 = pv_13(D) + 4294967288;
  322. # DEBUG puc => puc_15
  323. # DEBUG BEGIN_STMT
  324. # DEBUG pxLink => puc_15
  325. # DEBUG BEGIN_STMT
  326. _1 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  327. xBlockAllocatedBit.21_2 = xBlockAllocatedBit;
  328. _3 = _1 & xBlockAllocatedBit.21_2;
  329. if (_3 == 0)
  330. goto <bb 4>; [50.00%]
  331. else
  332. goto <bb 6>; [50.00%]
  333. <bb 4> [local count: 107374]:
  334. # DEBUG BEGIN_STMT
  335. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  336. # DEBUG BEGIN_STMT
  337. # DEBUG BEGIN_STMT
  338. __asm__ __volatile__(" mov %0, %1
  339. msr basepri, %0
  340. isb
  341. dsb
  342. " : "=r" ulNewBASEPRI_22 : "i" 16 : "memory");
  343. # DEBUG ulNewBASEPRI => ulNewBASEPRI_22
  344. <bb 5> [local count: 1073741823]:
  345. # DEBUG ulNewBASEPRI => NULL
  346. # DEBUG BEGIN_STMT
  347. # DEBUG BEGIN_STMT
  348. # DEBUG BEGIN_STMT
  349. <bb 11> [local count: 1073741824]:
  350. goto <bb 5>; [100.00%]
  351. <bb 6> [local count: 107374]:
  352. # DEBUG BEGIN_STMT
  353. # DEBUG BEGIN_STMT
  354. _4 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].pxNextFreeBlock;
  355. if (_4 != 0B)
  356. goto <bb 7>; [82.57%]
  357. else
  358. goto <bb 9>; [17.43%]
  359. <bb 7> [local count: 88659]:
  360. # DEBUG BEGIN_STMT
  361. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  362. # DEBUG BEGIN_STMT
  363. # DEBUG BEGIN_STMT
  364. __asm__ __volatile__(" mov %0, %1
  365. msr basepri, %0
  366. isb
  367. dsb
  368. " : "=r" ulNewBASEPRI_23 : "i" 16 : "memory");
  369. # DEBUG ulNewBASEPRI => ulNewBASEPRI_23
  370. <bb 8> [local count: 886588623]:
  371. # DEBUG ulNewBASEPRI => NULL
  372. # DEBUG BEGIN_STMT
  373. # DEBUG BEGIN_STMT
  374. # DEBUG BEGIN_STMT
  375. <bb 12> [local count: 886588623]:
  376. goto <bb 8>; [100.00%]
  377. <bb 9> [local count: 18715]:
  378. # DEBUG BEGIN_STMT
  379. # DEBUG BEGIN_STMT
  380. # DEBUG BEGIN_STMT
  381. # DEBUG BEGIN_STMT
  382. _5 = ~xBlockAllocatedBit.21_2;
  383. _6 = _1 & _5;
  384. MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize = _6;
  385. # DEBUG BEGIN_STMT
  386. vTaskSuspendAll ();
  387. # DEBUG BEGIN_STMT
  388. _7 = MEM[(struct BlockLink_t *)pv_13(D) + 4294967288B].xBlockSize;
  389. xFreeBytesRemaining.24_8 = xFreeBytesRemaining;
  390. _9 = _7 + xFreeBytesRemaining.24_8;
  391. xFreeBytesRemaining = _9;
  392. # DEBUG BEGIN_STMT
  393. # DEBUG BEGIN_STMT
  394. prvInsertBlockIntoFreeList (puc_15);
  395. # DEBUG BEGIN_STMT
  396. xNumberOfSuccessfulFrees.25_10 = xNumberOfSuccessfulFrees;
  397. _11 = xNumberOfSuccessfulFrees.25_10 + 1;
  398. xNumberOfSuccessfulFrees = _11;
  399. # DEBUG BEGIN_STMT
  400. xTaskResumeAll ();
  401. <bb 10> [local count: 110750]:
  402. # DEBUG BEGIN_STMT
  403. return;
  404. }
  405. pvPortMalloc (size_t xWantedSize)
  406. {
  407. uint32_t ulNewBASEPRI;
  408. uint32_t ulNewBASEPRI;
  409. void * pvReturn;
  410. struct BlockLink_t * pxNewBlockLink;
  411. struct BlockLink_t * pxPreviousBlock;
  412. struct BlockLink_t * pxBlock;
  413. struct BlockLink_t * pxEnd.0_1;
  414. unsigned int xBlockAllocatedBit.1_2;
  415. unsigned int _3;
  416. unsigned int _4;
  417. unsigned int _5;
  418. unsigned int _6;
  419. unsigned int _7;
  420. unsigned int xFreeBytesRemaining.2_9;
  421. unsigned int _10;
  422. struct A_BLOCK_LINK * _11;
  423. struct BlockLink_t * pxEnd.3_12;
  424. struct A_BLOCK_LINK * _13;
  425. struct A_BLOCK_LINK * _14;
  426. unsigned int _15;
  427. unsigned int pxNewBlockLink.4_16;
  428. unsigned int _17;
  429. unsigned int xFreeBytesRemaining.5_18;
  430. unsigned int _19;
  431. unsigned int _20;
  432. unsigned int xMinimumEverFreeBytesRemaining.7_21;
  433. unsigned int xBlockAllocatedBit.9_22;
  434. unsigned int _23;
  435. unsigned int xNumberOfSuccessfulAllocations.10_24;
  436. unsigned int _25;
  437. unsigned int pvReturn.11_26;
  438. unsigned int _27;
  439. unsigned int _57;
  440. <bb 2> [local count: 231566]:
  441. # DEBUG BEGIN_STMT
  442. # DEBUG BEGIN_STMT
  443. # DEBUG pvReturn => 0B
  444. # DEBUG BEGIN_STMT
  445. vTaskSuspendAll ();
  446. # DEBUG BEGIN_STMT
  447. pxEnd.0_1 = pxEnd;
  448. if (pxEnd.0_1 == 0B)
  449. goto <bb 3>; [17.43%]
  450. else
  451. goto <bb 4>; [82.57%]
  452. <bb 3> [local count: 40362]:
  453. # DEBUG BEGIN_STMT
  454. prvHeapInit ();
  455. <bb 4> [local count: 231566]:
  456. # DEBUG BEGIN_STMT
  457. # DEBUG BEGIN_STMT
  458. xBlockAllocatedBit.1_2 = xBlockAllocatedBit;
  459. _3 = xBlockAllocatedBit.1_2 & xWantedSize_39(D);
  460. if (_3 == 0)
  461. goto <bb 5>; [83.25%]
  462. else
  463. goto <bb 22>; [16.75%]
  464. <bb 5> [local count: 192779]:
  465. # DEBUG BEGIN_STMT
  466. _4 = xWantedSize_39(D) + 4294967295;
  467. if (_4 <= 4294967286)
  468. goto <bb 6>; [71.00%]
  469. else
  470. goto <bb 22>; [29.00%]
  471. <bb 6> [local count: 136873]:
  472. # DEBUG BEGIN_STMT
  473. xWantedSize_40 = xWantedSize_39(D) + 8;
  474. # DEBUG xWantedSize => xWantedSize_40
  475. # DEBUG BEGIN_STMT
  476. _5 = xWantedSize_40 & 7;
  477. if (_5 != 0)
  478. goto <bb 7>; [50.00%]
  479. else
  480. goto <bb 8>; [50.00%]
  481. <bb 7> [local count: 68436]:
  482. # DEBUG BEGIN_STMT
  483. _6 = xWantedSize_40 & 4294967288;
  484. _7 = _6 + 8;
  485. if (_7 > xWantedSize_40)
  486. goto <bb 8>; [71.00%]
  487. else
  488. goto <bb 22>; [29.00%]
  489. <bb 8> [local count: 117026]:
  490. # xWantedSize_28 = PHI <_7(7), xWantedSize_40(6)>
  491. # DEBUG xWantedSize => xWantedSize_28
  492. # DEBUG BEGIN_STMT
  493. if (xWantedSize_28 != 0)
  494. goto <bb 9>; [71.00%]
  495. else
  496. goto <bb 22>; [29.00%]
  497. <bb 9> [local count: 83089]:
  498. xFreeBytesRemaining.2_9 = xFreeBytesRemaining;
  499. if (xFreeBytesRemaining.2_9 >= xWantedSize_28)
  500. goto <bb 10>; [71.00%]
  501. else
  502. goto <bb 22>; [29.00%]
  503. <bb 10> [local count: 58993]:
  504. # DEBUG BEGIN_STMT
  505. # DEBUG pxPreviousBlock => &xStart
  506. # DEBUG BEGIN_STMT
  507. pxBlock_41 = xStart.pxNextFreeBlock;
  508. # DEBUG pxBlock => pxBlock_41
  509. # DEBUG BEGIN_STMT
  510. <bb 11> [local count: 551465]:
  511. # pxBlock_29 = PHI <pxBlock_41(10), _11(28)>
  512. # pxPreviousBlock_30 = PHI <&xStart(10), pxBlock_29(28)>
  513. # DEBUG pxPreviousBlock => pxPreviousBlock_30
  514. # DEBUG pxBlock => pxBlock_29
  515. # DEBUG BEGIN_STMT
  516. _10 = pxBlock_29->xBlockSize;
  517. if (_10 < xWantedSize_28)
  518. goto <bb 12>; [94.50%]
  519. else
  520. goto <bb 13>; [5.50%]
  521. <bb 12> [local count: 521134]:
  522. _11 = pxBlock_29->pxNextFreeBlock;
  523. if (_11 != 0B)
  524. goto <bb 28>; [94.50%]
  525. else
  526. goto <bb 13>; [5.50%]
  527. <bb 28> [local count: 492472]:
  528. goto <bb 11>; [100.00%]
  529. <bb 13> [local count: 58993]:
  530. # _57 = PHI <_10(11), _10(12)>
  531. # pxBlock_54 = PHI <pxBlock_29(11), pxBlock_29(12)>
  532. # pxPreviousBlock_8 = PHI <pxPreviousBlock_30(11), pxPreviousBlock_30(12)>
  533. # DEBUG BEGIN_STMT
  534. pxEnd.3_12 = pxEnd;
  535. if (pxEnd.3_12 != pxBlock_54)
  536. goto <bb 14>; [85.10%]
  537. else
  538. goto <bb 22>; [14.90%]
  539. <bb 14> [local count: 50203]:
  540. # DEBUG BEGIN_STMT
  541. _13 = pxPreviousBlock_8->pxNextFreeBlock;
  542. pvReturn_42 = _13 + 8;
  543. # DEBUG pvReturn => pvReturn_42
  544. # DEBUG BEGIN_STMT
  545. _14 = pxBlock_54->pxNextFreeBlock;
  546. pxPreviousBlock_8->pxNextFreeBlock = _14;
  547. # DEBUG BEGIN_STMT
  548. _15 = _57 - xWantedSize_28;
  549. if (_15 > 16)
  550. goto <bb 15>; [50.00%]
  551. else
  552. goto <bb 19>; [50.00%]
  553. <bb 15> [local count: 25102]:
  554. # DEBUG BEGIN_STMT
  555. pxNewBlockLink_44 = pxBlock_54 + xWantedSize_28;
  556. # DEBUG pxNewBlockLink => pxNewBlockLink_44
  557. # DEBUG BEGIN_STMT
  558. pxNewBlockLink.4_16 = (unsigned int) pxNewBlockLink_44;
  559. _17 = pxNewBlockLink.4_16 & 7;
  560. if (_17 != 0)
  561. goto <bb 16>; [67.00%]
  562. else
  563. goto <bb 18>; [33.00%]
  564. <bb 16> [local count: 16818]:
  565. # DEBUG BEGIN_STMT
  566. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  567. # DEBUG BEGIN_STMT
  568. # DEBUG BEGIN_STMT
  569. __asm__ __volatile__(" mov %0, %1
  570. msr basepri, %0
  571. isb
  572. dsb
  573. " : "=r" ulNewBASEPRI_55 : "i" 16 : "memory");
  574. # DEBUG ulNewBASEPRI => ulNewBASEPRI_55
  575. <bb 17> [local count: 168180375]:
  576. # DEBUG ulNewBASEPRI => NULL
  577. # DEBUG BEGIN_STMT
  578. # DEBUG BEGIN_STMT
  579. # DEBUG BEGIN_STMT
  580. <bb 26> [local count: 168180375]:
  581. goto <bb 17>; [100.00%]
  582. <bb 18> [local count: 8283]:
  583. # DEBUG BEGIN_STMT
  584. # DEBUG BEGIN_STMT
  585. pxNewBlockLink_44->xBlockSize = _15;
  586. # DEBUG BEGIN_STMT
  587. pxBlock_54->xBlockSize = xWantedSize_28;
  588. # DEBUG BEGIN_STMT
  589. prvInsertBlockIntoFreeList (pxNewBlockLink_44);
  590. <bb 19> [local count: 33385]:
  591. # DEBUG BEGIN_STMT
  592. # DEBUG BEGIN_STMT
  593. xFreeBytesRemaining.5_18 = xFreeBytesRemaining;
  594. _19 = pxBlock_54->xBlockSize;
  595. _20 = xFreeBytesRemaining.5_18 - _19;
  596. xFreeBytesRemaining = _20;
  597. # DEBUG BEGIN_STMT
  598. xMinimumEverFreeBytesRemaining.7_21 = xMinimumEverFreeBytesRemaining;
  599. if (_20 < xMinimumEverFreeBytesRemaining.7_21)
  600. goto <bb 20>; [50.00%]
  601. else
  602. goto <bb 21>; [50.00%]
  603. <bb 20> [local count: 16693]:
  604. # DEBUG BEGIN_STMT
  605. xMinimumEverFreeBytesRemaining = _20;
  606. <bb 21> [local count: 33385]:
  607. # DEBUG BEGIN_STMT
  608. # DEBUG BEGIN_STMT
  609. xBlockAllocatedBit.9_22 = xBlockAllocatedBit;
  610. _23 = _19 | xBlockAllocatedBit.9_22;
  611. pxBlock_54->xBlockSize = _23;
  612. # DEBUG BEGIN_STMT
  613. pxBlock_54->pxNextFreeBlock = 0B;
  614. # DEBUG BEGIN_STMT
  615. xNumberOfSuccessfulAllocations.10_24 = xNumberOfSuccessfulAllocations;
  616. _25 = xNumberOfSuccessfulAllocations.10_24 + 1;
  617. xNumberOfSuccessfulAllocations = _25;
  618. <bb 22> [local count: 214748]:
  619. # pvReturn_31 = PHI <0B(4), 0B(9), 0B(8), 0B(13), pvReturn_42(21), 0B(7), 0B(5)>
  620. # DEBUG xWantedSize => NULL
  621. # DEBUG pvReturn => pvReturn_31
  622. # DEBUG BEGIN_STMT
  623. # DEBUG BEGIN_STMT
  624. # DEBUG BEGIN_STMT
  625. xTaskResumeAll ();
  626. # DEBUG BEGIN_STMT
  627. pvReturn.11_26 = (unsigned int) pvReturn_31;
  628. _27 = pvReturn.11_26 & 7;
  629. if (_27 != 0)
  630. goto <bb 23>; [50.00%]
  631. else
  632. goto <bb 25>; [50.00%]
  633. <bb 23> [local count: 107374]:
  634. # DEBUG BEGIN_STMT
  635. # DEBUG INLINE_ENTRY vPortRaiseBASEPRI
  636. # DEBUG BEGIN_STMT
  637. # DEBUG BEGIN_STMT
  638. __asm__ __volatile__(" mov %0, %1
  639. msr basepri, %0
  640. isb
  641. dsb
  642. " : "=r" ulNewBASEPRI_56 : "i" 16 : "memory");
  643. # DEBUG ulNewBASEPRI => ulNewBASEPRI_56
  644. <bb 24> [local count: 1073741824]:
  645. # DEBUG ulNewBASEPRI => NULL
  646. # DEBUG BEGIN_STMT
  647. # DEBUG BEGIN_STMT
  648. # DEBUG BEGIN_STMT
  649. <bb 27> [local count: 1073741824]:
  650. goto <bb 24>; [100.00%]
  651. <bb 25> [local count: 107374]:
  652. # DEBUG BEGIN_STMT
  653. # DEBUG BEGIN_STMT
  654. return pvReturn_31;
  655. }