<feed xmlns='http://www.w3.org/2005/Atom'>
<title>platform_system_libufdt/ufdt_node.c, branch pie-cuttlefish-testing</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/'/>
<entry>
<title>Reduce call stack memory usage in ufdt_node_destruct()</title>
<updated>2017-06-09T06:56:26+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-06-09T06:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=3f56fa74b40f290caac761bd03350ec1607dc3d8'/>
<id>3f56fa74b40f290caac761bd03350ec1607dc3d8</id>
<content type='text'>
Revise the recursive function calls to be a loop in function
ufdt_node_destruct(), to reduce the call stack memory usage.

Bug: 62473375
Test: tests/run_tests.sh
Change-Id: Ifec5d655407aded115115be7d8196bfad97623d9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Revise the recursive function calls to be a loop in function
ufdt_node_destruct(), to reduce the call stack memory usage.

Bug: 62473375
Test: tests/run_tests.sh
Change-Id: Ifec5d655407aded115115be7d8196bfad97623d9
</pre>
</div>
</content>
</entry>
<entry>
<title>libufdt: reduce the number of malloc/free calling</title>
<updated>2017-04-25T09:16:18+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-04-24T02:17:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=d62a849ab43430326c33d3e004a42e9b34080731'/>
<id>d62a849ab43430326c33d3e004a42e9b34080731</id>
<content type='text'>
The performance of some bootloader malloc/free implementation isn't
optimized, but libufdt calls huge number of malloc/free to build a
real tree data structure.

The patch adds an ufdt_node_pool to reduce the number of malloc/free.
ufdt_node_pool asks a larger memory block in each time, and
distributes the memory into several ufdt_node (ufdt_node_fdt_prop
or ufdt_node_fdt_node). libufdt doesn't need to call malloc()
to allocate memory until out of larger memory block.

The setting of this patch is 1024 nodes in each memory block,
so it can reduce ~1023/1024 malloc/free calling times after the patch
is applied.

Bug: 32969430
Test: ./tests/run_tests.sh
Test: ./tests/run_performance_test.sh
Change-Id: Id95e74da1235b9e2fc306500686515ee6b93017d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The performance of some bootloader malloc/free implementation isn't
optimized, but libufdt calls huge number of malloc/free to build a
real tree data structure.

The patch adds an ufdt_node_pool to reduce the number of malloc/free.
ufdt_node_pool asks a larger memory block in each time, and
distributes the memory into several ufdt_node (ufdt_node_fdt_prop
or ufdt_node_fdt_node). libufdt doesn't need to call malloc()
to allocate memory until out of larger memory block.

The setting of this patch is 1024 nodes in each memory block,
so it can reduce ~1023/1024 malloc/free calling times after the patch
is applied.

Bug: 32969430
Test: ./tests/run_tests.sh
Test: ./tests/run_performance_test.sh
Change-Id: Id95e74da1235b9e2fc306500686515ee6b93017d
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct code placement for different license</title>
<updated>2017-04-17T02:31:11+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-04-17T02:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=e78aa56232a888c30b5de559797578eac6bc1663'/>
<id>e78aa56232a888c30b5de559797578eac6bc1663</id>
<content type='text'>
Previous code revising moved some code into a file with different license.
Fix it in this patch.

Test: ./tests/run_tests.sh
Change-Id: Ie50000bba7a6bf8d9d65dcc1a1cf21135ac3b97a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous code revising moved some code into a file with different license.
Fix it in this patch.

Test: ./tests/run_tests.sh
Change-Id: Ie50000bba7a6bf8d9d65dcc1a1cf21135ac3b97a
</pre>
</div>
</content>
</entry>
<entry>
<title>Code revise</title>
<updated>2017-04-15T03:09:17+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-04-14T07:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=8a7039c218527bfc25a2831f480a9558e64f84e5'/>
<id>8a7039c218527bfc25a2831f480a9558e64f84e5</id>
<content type='text'>
- Remove unused code
- Remove internel functions from header file
- Fix typos
- Revise all function names with prefix ufdt_*

Test: ./tests/run_tests.sh
Change-Id: I4f89e90eb983540e78aadb092c07de62d219e454
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Remove unused code
- Remove internel functions from header file
- Fix typos
- Revise all function names with prefix ufdt_*

Test: ./tests/run_tests.sh
Change-Id: I4f89e90eb983540e78aadb092c07de62d219e454
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Apache2 module license</title>
<updated>2017-04-15T02:49:05+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-04-06T09:12:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=6ad4caae73191bdc2403185b6482969c17604c95'/>
<id>6ad4caae73191bdc2403185b6482969c17604c95</id>
<content type='text'>
Bug: 36678371
Test: mmm system/libufdt, and success build
Change-Id: I73059f5beca2242f8883fca86cb49d53d0f543b8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: 36678371
Test: mmm system/libufdt, and success build
Change-Id: I73059f5beca2242f8883fca86cb49d53d0f543b8
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid to re-generate string table from ufdt to fdt</title>
<updated>2017-04-13T07:28:55+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-03-30T03:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=1be68ae53e645de1b2ec26140b302fbfcbbb919f'/>
<id>1be68ae53e645de1b2ec26140b302fbfcbbb919f</id>
<content type='text'>
String table contains the strings of all property name in a fdt.

The ufdt_apply_overlay() converts two dtbs from fdt to ufdt,
overlays, and converts merged ufdt to fdt. These operations
shouldn't create new peroperty names, so we can just re-use the
string tables in original dtbs, and just copy them into merged
fdt. This solution can enhance a lot of performance for device
tree overlaying.

To avoid the error that some users could use string offset in
string table, the solution also give a same string offset for
the name properties by ufdt_prop_dict;

Futher, the patch also removed unused header files after
changing algorithm.

Bug: 35255584
Test: ./tests/run_tests.sh
Change-Id: Id422730115531bd20d21117285291bdd860915ff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
String table contains the strings of all property name in a fdt.

The ufdt_apply_overlay() converts two dtbs from fdt to ufdt,
overlays, and converts merged ufdt to fdt. These operations
shouldn't create new peroperty names, so we can just re-use the
string tables in original dtbs, and just copy them into merged
fdt. This solution can enhance a lot of performance for device
tree overlaying.

To avoid the error that some users could use string offset in
string table, the solution also give a same string offset for
the name properties by ufdt_prop_dict;

Futher, the patch also removed unused header files after
changing algorithm.

Bug: 35255584
Test: ./tests/run_tests.sh
Change-Id: Id422730115531bd20d21117285291bdd860915ff
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the libufdt overlay node order</title>
<updated>2017-02-21T03:42:14+00:00</updated>
<author>
<name>SzuWei Lin</name>
<email>szuweilin@google.com</email>
</author>
<published>2017-02-20T02:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=08dd727484a9f5619e0be18a1f601c21f371c5b7'/>
<id>08dd727484a9f5619e0be18a1f601c21f371c5b7</id>
<content type='text'>
libufdt could reversed the node order during overlaying.

However, the libfdt overlay in dtc doesn't promise the node order.
But looks there are some implementation of kernel drivers depend on
the order in DTS.

The patch keeps the DTB/DTBO node order during libufdt overlaying.
Notes that the node order merged by libufdt could not match the
result of libfdt.

Bug: 35429321
Test: run test scripts (see libufdt/tests/README)
Change-Id: I7209ebfaa21d6640d547b029ea0f0edf6e58fca1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libufdt could reversed the node order during overlaying.

However, the libfdt overlay in dtc doesn't promise the node order.
But looks there are some implementation of kernel drivers depend on
the order in DTS.

The patch keeps the DTB/DTBO node order during libufdt overlaying.
Notes that the node order merged by libufdt could not match the
result of libfdt.

Bug: 35429321
Test: run test scripts (see libufdt/tests/README)
Change-Id: I7209ebfaa21d6640d547b029ea0f0edf6e58fca1
</pre>
</div>
</content>
</entry>
<entry>
<title>libufdt: device tree overlay via unflattening FDT</title>
<updated>2016-12-21T04:25:33+00:00</updated>
<author>
<name>Li Chen</name>
<email>akaineko@google.com</email>
</author>
<published>2016-11-28T04:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=f6c209b3f409f879305ac9837524b9d34c850de6'/>
<id>f6c209b3f409f879305ac9837524b9d34c850de6</id>
<content type='text'>
The original version of libdtoverlay is slow in searching for
particular nodes and adding subnodes/properties due to the operations
on flattened device tree (FDT).

`libufdt` builds a real tree structure (named ufdt -- unflattned
device tree) from FDT. In the real tree, we can perform certain
operations (e.g., merge 2 subtrees, search for a node by path) in
almost optimal time complexity with acceptable additional memory usage.

With libufdt, we improve the merging of two dtb files from O(N^2) to
O(N), where N is the number of nodes in the tree.

Bug: 30800619
Test: run test scripts (see libufdt/tests/README)
Test: manually ported libufdt into a bootloader,
      checked it can merge a base dtb and a dtbo to generate a final dtb
      to boot the device

Change-Id: I1ff886bb8a62bad1451edcd7c4fe5cb48b7a034a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original version of libdtoverlay is slow in searching for
particular nodes and adding subnodes/properties due to the operations
on flattened device tree (FDT).

`libufdt` builds a real tree structure (named ufdt -- unflattned
device tree) from FDT. In the real tree, we can perform certain
operations (e.g., merge 2 subtrees, search for a node by path) in
almost optimal time complexity with acceptable additional memory usage.

With libufdt, we improve the merging of two dtb files from O(N^2) to
O(N), where N is the number of nodes in the tree.

Bug: 30800619
Test: run test scripts (see libufdt/tests/README)
Test: manually ported libufdt into a bootloader,
      checked it can merge a base dtb and a dtbo to generate a final dtb
      to boot the device

Change-Id: I1ff886bb8a62bad1451edcd7c4fe5cb48b7a034a
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "libufdt: device tree overlay via unflattening FDT"</title>
<updated>2016-12-14T02:36:07+00:00</updated>
<author>
<name>Jeff Hao</name>
<email>jeffhao@google.com</email>
</author>
<published>2016-12-14T02:36:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=eeaff8f66f44518a0e776957c6e0921f7799ace2'/>
<id>eeaff8f66f44518a0e776957c6e0921f7799ace2</id>
<content type='text'>
This reverts commit 3084ce7cbdff84093286459758f99c15082e6556.

Change-Id: I36f8252ea77c75301711009180c1908bb18e231c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3084ce7cbdff84093286459758f99c15082e6556.

Change-Id: I36f8252ea77c75301711009180c1908bb18e231c
</pre>
</div>
</content>
</entry>
<entry>
<title>libufdt: device tree overlay via unflattening FDT</title>
<updated>2016-12-05T23:30:16+00:00</updated>
<author>
<name>LiChen</name>
<email>akaineko@google.com</email>
</author>
<published>2016-11-28T04:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/mirrors/AOSP/platform_system_libufdt/commit/?id=3084ce7cbdff84093286459758f99c15082e6556'/>
<id>3084ce7cbdff84093286459758f99c15082e6556</id>
<content type='text'>
The original version of libdtoverlay is slow in searching for
particular nodes and adding subnodes/properties due to the operations
on flattened device tree (FDT).

`libufdt` builds a real tree structure (named ufdt -- unflattned
device tree) from FDT. In the real tree, we can perform certain
operations (e.g., merge 2 subtrees, search for a node by path) in
almost optimal time complexity with acceptable additional memory usage.

With libufdt, we improve the merging of two dtb files from O(N^2) to
O(N), where N is the number of nodes in the tree.

Bug: 30800619
Test: run test scripts (see libufdt/tests/README)
Test: manually ported libufdt into a bootloader,
      checked it can merge a base dtb and a dtbo to generate a final dtb
      to boot the device
Change-Id: I6a282cc99129d5280ecbf40852723f83735fa523
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original version of libdtoverlay is slow in searching for
particular nodes and adding subnodes/properties due to the operations
on flattened device tree (FDT).

`libufdt` builds a real tree structure (named ufdt -- unflattned
device tree) from FDT. In the real tree, we can perform certain
operations (e.g., merge 2 subtrees, search for a node by path) in
almost optimal time complexity with acceptable additional memory usage.

With libufdt, we improve the merging of two dtb files from O(N^2) to
O(N), where N is the number of nodes in the tree.

Bug: 30800619
Test: run test scripts (see libufdt/tests/README)
Test: manually ported libufdt into a bootloader,
      checked it can merge a base dtb and a dtbo to generate a final dtb
      to boot the device
Change-Id: I6a282cc99129d5280ecbf40852723f83735fa523
</pre>
</div>
</content>
</entry>
</feed>
