blob: e244fabbca256383a4f636d888d0c5ace55ba9a3 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001//**************************************************************************
2//*
3//* Copyright (c) 2016 ZTE Corporation.
4//*
5//**************************************************************************
6// geanfeng
7
8//**************************************************************************
9//* ½Å±¾½âÎöÇøÓò
10//**************************************************************************
11//´´½¨Ò»¸ö´°¿Ú£»
12&width=50.
13&nameWidth=20.
14&fileColumns=1000.
15&fileLines=1000.
16
17area.create trace &fileColumns &fileLines
18area.clear trace
19area.select trace
20
21//´ò¿ªÎļþ£»
22&dir=os.pwd()+"\log_buddfy"
23if !os.dir(&dir)
24(
25 mkdir &dir
26)
27&file="&dir\result.txt"
28area.open trace &file
29area.view trace
30
31//Èç¹ûT32ÔÚÔËÐÐÒª¶Ïס£»
32if run()
33(
34 break
35)
36&node=v.value(buddy_employ_head.next)
37&head=v.value(&buddy_employ_head)
38while !(&node==&head)
39(
40 &addr=v.value(((struct heap_record*)&node)->addr)
41 &size=v.value(((struct heap_record*)&node)->size)
42 &thread=v.string(((struct heap_record*)&node)->task_name)
43 &i=0
44 &stack=""
45 &stack_value=v.value(((struct heap_record*)&node)->stack_frame[&i])
46 while &i<0xa
47 (
48 if !(&stack_value==0)
49 (
50 &stack_frame=Y.function(P:&stack_value)
51 &stack_frame=os.file.name("&stack_frame")
52 &stack="&stack"+"&i:"+"&stack_frame "
53 &i=&i+1
54 &stack_value=v.value(((struct heap_record*)&node)->stack_frame[&i])
55 )
56 else
57 (
58 goto next
59 )
60 )
61next:
62 &size=format.decimal(10., &size)
63 print "node: "+"&node"+" addr: "+"&addr"+" size:"+"&size"+" thread:"+"&thread"+" stack_frame:"+"&stack"
64 &node=v.value(((struct list_head*)&node)->next)
65)
66
67print "allocated hobby End-----------------------------"
68
69area.close trace
70ENDDO
71//****ÔËÐнáÊø*****