“This is the 12th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

preface

In my last blog post, I explained how to use ADB to check the priority of a process

Write another blog post about how to check thread priority in this process


View the priority of a thread

Gets the PID of the process you want to view

It’s also easy to check thread priority

Start with the adb shell command

Then find process, execute the command: ps – A | grep package name

I’m using hereps -A | grep com , you can select the process with ‘com’ in the process name to find the process you want, as shown below

View the thread priority based on the process PID

After finding the process PID from the previous command, you can execute the next command to check the thread priority

Then look at the thread priority command: top-h -p PID

For example, if I want to check the process number 2094, the process number is PID

Top -h -p 2094 top -h -p 2094 top -h -p 2094

The followingPRisPriority of the thread!

In Android, the priority of A thread is related to the call order. The higher the priority is, the more likely it is to be called. In other words, even if thread A has A higher priority than thread B, thread A may not be called before thread B in the same case.

About process, thread this aspect thing or very good distinction, sometimes the demand is not the same must not be confused!