History log of /frameworks/native/cmds/lshal/Lshal.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d8e20191c2fa10a458b29bb06502487d704ba076 24-May-2017 Steven Moreland <smoreland@google.com> Add thread usage output to lshal.

This output shows how many threads are in use at a give time.

Test: lshal, manual
Bug: 35099601
Change-Id: I3a22bb131b828cdd77e73e7810229d9c68a496d3
/frameworks/native/cmds/lshal/Lshal.cpp
9881df9717388f8740d2d7d2ac2e42eaf8bd85c9 10-May-2017 Yifan Hong <elsk@google.com> Add tests to lshal.

Test: lshal_test
Bug: 37954458
Change-Id: I1914e6274974ed5eb0ce2d655f1333d2344b49f5
/frameworks/native/cmds/lshal/Lshal.cpp
48dc9f8586c288e152bdd5e14423281764f8db5f 10-May-2017 Yifan Hong <elsk@google.com> Add `lshal debug` command.

Supported command:
lshal debug android.hardware.foo@1.0::IFoo option option

Test: adb unroot && lshal --debug ; echo $?
Test: adb unroot && lshal debug android.hardware.nfc@1.0::INfc ; echo $?
Test: adb root && lshal --debug ; echo $?
Test: adb root && lshal debug android.hardware.nfc@1.0::INfc ; echo $?

Bug: 37954458
Change-Id: Ia2f4c9c0d3fb0a7bb26e76f01d02f49dc426e7f8
/frameworks/native/cmds/lshal/Lshal.cpp
443df7932cedd88d523164ac7175fa19ec553c7b 10-May-2017 Yifan Hong <elsk@google.com> Lshal: support commands.

Support the following commands:
lshal list
lshal list -itrpc
lshal help
lshal help list
lshal list -h
lshal list --help

Test: run these commands
Bug: 37725279
Change-Id: I970fbc8d250d43f57e92f783229e0645d7e8df4e
/frameworks/native/cmds/lshal/Lshal.cpp
06ceb02325f1e696c9b837fb18e9d78d716ed3a8 03-May-2017 Yifan Hong <elsk@google.com> Fix lshal --init-vintf may have empty <instance> tags.

Test: on bullhead, lshal --init-vintf | grep "<instance></instance>"

Change-Id: Ic6ab977adcdc5293015e9daba506b625629e5352
Fixes: 37311367
/frameworks/native/cmds/lshal/Lshal.cpp
6fb35106669d324a5d47d16f5d3604c6c123bb28 03-May-2017 Steven Moreland <smoreland@google.com> Lshal: note debug in help

Test: pass
Bug: 37725279
Change-Id: I2f43628e42f2cb334083dcb4f7d174100021a745
/frameworks/native/cmds/lshal/Lshal.cpp
9ee841f0944dde330bb8e466e808941081b187ed 18-Apr-2017 Yifan Hong <elsk@google.com> Fix lshal not to squash HAL entries incorrectly.

Bug: 37311367
Test: lshal --init-vintf
Change-Id: I693b53f5f342c7600e4031d020792fd347e3ae83
/frameworks/native/cmds/lshal/Lshal.cpp
dd315948dbfa02ca4262ca5bb0e29e25b95803ad 17-Apr-2017 Yifan Hong <elsk@google.com> Merge "Update to allow multiple HALs in a manifest."
a46e2f840b5574b0c6cf633fadebc9f66f76194b 13-Apr-2017 Yifan Hong <elsk@google.com> Update to allow multiple HALs in a manifest.

Test: libvintf_test
Test: lshal --init_vintf

Bug: 37294247
Change-Id: I202787d7856db6e06e595bd52c644f6a0eefcb66
/frameworks/native/cmds/lshal/Lshal.cpp
fab4ea32ace8992903536da66e62d97204d73eac 05-Apr-2017 Yifan Hong <elsk@google.com> lshal --init-vintf stripped <impl> tag.

<impl> tag is deprecated from the manifest.

Test: lshal --init-vintf
Change-Id: Ifa9336e3dfe7f1091ee61aa6a10df9629ad98b49
/frameworks/native/cmds/lshal/Lshal.cpp
28d35913d5324dd520d80d9b6afdd0698afa8fd4 24-Mar-2017 Andreas Huber <andih@google.com> Enable --debug option for "lshal" command.

This calls into live binderized services and logs their "IBase::debug(...)"
output.

Bug: 36520620
Test: make, adb shell lshal, adb shell bugreport
Change-Id: Ida3b0c61eafd9f3de562a5df3af24bbaf383de22
/frameworks/native/cmds/lshal/Lshal.cpp
8db626d2f3b570ddfca12394b99f92b96dd34c69 23-Mar-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "lshal: --init-vintf exclude system hals"
9b6cd60472dfbcfeacbd7c6e486dc435599d3021 22-Mar-2017 Steven Moreland <smoreland@google.com> lshal: --init-vintf exclude system hals

--init-vintf is provided for convenience so that vendors can initialize
their vendor interface. Excluding system hals so that they aren't
included in the default vintf file that is generated. They are
maintained manually.

Test: Verified frameworks hals are no longer visible in init-vintf.
Bug: 34772739
Change-Id: Ie40c384334affcb3abee063d58000b808f04e234
/frameworks/native/cmds/lshal/Lshal.cpp
56d2d516937ae4b71163abcbe98a80b09955e898 21-Mar-2017 Steven Moreland <smoreland@google.com> Update re hwservicemanager debugDump semantics.

Test: internal boots, hidl_test, lshal works
Bug: 36414311
Change-Id: I572269a679dea3b6e985227f6727850f7dd33b58
/frameworks/native/cmds/lshal/Lshal.cpp
3fdbd9f9347f495530036fb4306d769380d6c40f 08-Mar-2017 Yifan Hong <elsk@google.com> Update to use bitness info in VINTF.

Bug: 35966597
Test: lshal -ir has bitness info for passthrough ref section
Test: lshal --init-vintf has bitness info in the manifest.
Change-Id: Ie9f52bb1ca30ce69856dbf44fab8287563014550
/frameworks/native/cmds/lshal/Lshal.cpp
8ab3bee8df72dea6d1ca0fe2ec9cd87b0fa3d5be 08-Mar-2017 Yifan Hong <elsk@google.com> Fix forEachTable will copy the table.

std::initializer_list<T> has T deduced to Table, which will
copy the table. Use pointers instead.

Test: pass
Change-Id: I7da40eb0f5d0171244a9b9caacf37b41fe0af304
/frameworks/native/cmds/lshal/Lshal.cpp
1071c1bf64903ca545c0a216c07708c33f4a832d 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: update descriptions in output.

Test: pass
Change-Id: I912e2153e531a35ecdf1e76fd6bafa68880b8721
/frameworks/native/cmds/lshal/Lshal.cpp
a3b8709a5dfc57d6d6bcc0ee89bbeb4aed3e908c 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: Put more description to output

Split the output by three parts according to the source of information.
Describe each part before the table.

--sort will be applied to each table individually.

Bug: 35803917
Test: lshal
Change-Id: Ief0dae21fdeb58ebaed46d2aa68f298b8b75218d
/frameworks/native/cmds/lshal/Lshal.cpp
b44790219f43369883b3dd8eaf3971bdc5fe656b 03-Mar-2017 Yifan Hong <elsk@google.com> lshal: also list libraries in 32-bit.

Add an "Arch" column (selected by -r) to lshal
to show whether the HAL runs in 32 bit or 64 bit.

* For binderized services, whether the process
runs in 32bit or 64bit (__LP64__)
* For passthrough libraries (-impl.so), whether
the library is in /{system,vendor,odm}/lib/hw
or /{system,vendor,odm}lib64/hw

Bug: 35803184
Test: lshal -itrpc
Change-Id: I328da4ad9eacbf2959be4ac2e478c16535a89068
/frameworks/native/cmds/lshal/Lshal.cpp
4b86549b14b30a0ba4381c09c5ce5185ad56bf1c 01-Mar-2017 Yifan Hong <elsk@google.com> lshal --vintf to create a skeleton hal manifest.

Run it as follows:
lshal --init-vintf=/data/a.xml
lshal --init-vintf > /data/a.xml

Test: lshal --init-vintf with and without path argument
Bug: 35852743
Change-Id: Ief9385fc2764a487d1a70644699e01133bdc8a8e
/frameworks/native/cmds/lshal/Lshal.cpp
9b5c15d266b3fd5d26c992f8f8f4e6a3a03436df 01-Mar-2017 Steven Moreland <smoreland@google.com> lshal: separate timeout for hwservicemanager list

Bug: 35752836
Test: lshal works
Change-Id: I201da49e375d2d5e9ea67dfdf34ef2d5a8b537b0
/frameworks/native/cmds/lshal/Lshal.cpp
a57dffb151145529e71b22a8d7f985bc1de105f4 21-Feb-2017 Yifan Hong <elsk@google.com> lshal: Fix timeout causes unexpected exits.

with thread::detach the background thread keeps running even after
the thread object is destroyed; the background thread will access
caller's stack memory, causing segfault. Change it to a thread join
to avoid the issue. To avoid waiting too long on the child thread,
send a SIGINT if timeout (child thread's signal handler will then
call pthread_exit() to terminate the thread).

Since we are using pthread_* functions, change usage of std::thread
to pthread_t for consistency.

Test: lshal
Test: run lshal with IPC_CALL_TIMEOUT set to zero will no longer
cause SIGSEGV and SIGABRT (test 10 times)

Bug: 35623669
Change-Id: I4eef8ffd8ff399793648e861ca4c1a2bdcc7ec50
/frameworks/native/cmds/lshal/Lshal.cpp
ae09a3ddfec51c82257e338346e39ee472470061 15-Feb-2017 Yifan Hong <elsk@google.com> lshal: Add option to print cmd lines instead of pids.

Add -m to arguments of lshal. When this flag is set,
/proc/{pid}/cmdline is printed instead of a plain PID.
If the file doesn't exist, it will be striped out from
the PID column as well (the process is considered died
and won't hold a reference to the binder object.)

Test: lshal -icm

Bug: 35160832

Change-Id: I4345bf06112a1f87ce91bec6f6f787703e46cd17
/frameworks/native/cmds/lshal/Lshal.cpp
e2dadf0c4f132d3a39309f4e274f1a35f7caaaed 15-Feb-2017 Yifan Hong <elsk@google.com> lshal: Add timeout for IPC calls.

IPC calls into interfaces should be done fault-torelently.
Add a timeout for each IPC call made so that lshal won't be
indefinitely blocked even if the interface don't reply
promptly.

Bug: 35317039

Test: lshal

Change-Id: Icb8157716ad68bddb5b33304b9063aa6f233985d
/frameworks/native/cmds/lshal/Lshal.cpp
38d53e0327f200a8a16f99d1e1a09e33c2be8e81 14-Feb-2017 Yifan Hong <elsk@google.com> lshal: Allow selecting columns and sorting by column.

Examples: see tests below.

Test: lshal
Test: lshal -intpac
Test: lshal --sort=i
Test: lshal --sort=p

Bug: 34984175

Change-Id: Ia09823776a206868a5d58a2ede153a4538147756
/frameworks/native/cmds/lshal/Lshal.cpp
b0dde932ad8989a393fad148c17817bcb2ff7a43 11-Feb-2017 Yifan Hong <elsk@google.com> lshal: Refactor lshal to use an Lshal class; combined instance column with interface column

We need to be able to select columns, sort columns,
and do IPC calls fault-tolerently.
Refactoring lshal.cpp into an Lshal class for more
objective-oriented programming, so that global variables
can be avoided and less parameters will need
to be passed around.

Test: lshal outputs identical output as without this CL, except
with the column merged.

Change-Id: I9668c998da692222aef96ae67bbab8066172543d
/frameworks/native/cmds/lshal/Lshal.cpp