Cross-language shared constants for tracking observability in inspect.
The constants below are inspect keys. We name them so that the names shown in Inspect output associate well with their meaning.
Some conventions used for uniform reporting:
- All timestamps are expressed in nanoseconds, and suffixed with "_ns".
- All durations are expressed in nanoseconds, and suffixed with "_ns".
- All plain counters are suffixed with
_count
. - All node constant names are suffixed with
_NODE
.
CONSTANTS
Name | Value | Type | Description |
---|---|---|---|
ACTIVE_EPOLLS_COUNT | active_epolls_count |
String |
The number of current active epolls, recorded when epolls become active / inactive and if we attempted to suspend, but failed because there were active epolls. |
ACTIVE_WAKE_LOCK_NAMES | active_wake_lock_names |
String |
The name of current active wake locks, recorded when wake locks become active and if we attempted to suspend, but failed because there were active wake locks. |
INACTIVE_WAKE_LOCK_NAMES | inactive_wake_lock_names |
String |
The name of current inactive wake locks, recorded when wake locks become inactive and if we attempted to suspend, but failed because there were active wake locks. |
RESUME_CALLBACK_PHASE_END_AT | resume_callbacks_ended_at_ns |
String |
Timestamp in nanos, for the end of resume callback processing. Resume is not gated on phase completion. Event is recorded in SUSPEND_EVENTS_NODE. |
RESUME_CALLBACK_PHASE_START_AT | resume_callbacks_started_at_ns |
String |
Timestamp in nanos, for the start of resume callback processing. Resume is not gated on phase completion. Event is recorded in SUSPEND_EVENTS_NODE. |
SUSPEND_ATTEMPTED_AT | attempted_at_ns |
String |
Timestamp in nanos at which suspend was attempted. |
SUSPEND_ATTEMPT_BLOCKED_AT | attempt_blocked_at_ns |
String |
Timestamp in nanos for when a suspend attempt was blocked internally. Suspend may be repeatedly blocked until all suspend locks and suspend blockers have been dropped. |
SUSPEND_BLOCKER_ACQUIRED_AT | suspend_blocker_acquired_at_ns |
String |
Timestamp in nanos for when at least one suspend blocker is acquired. This occurs when an internal procedure needs to prevent suspension. For example, when servicing a wake lease request, system-activity-governor will acquire a suspend blocker for the lifetime of the wake lease token. This prevents suspension even while the underlying power broker lease is pending. |
SUSPEND_BLOCKER_DROPPED_AT | suspend_blocker_dropped_at_ns |
String |
Timestamp in nanos for when the last suspend blocker is dropped. |
SUSPEND_CALLBACK_PHASE_END_AT | suspend_callbacks_ended_at_ns |
String |
Timestamp in nanos, for the end of suspend callback processing. Suspend is gated on phase completion. Event is recorded in SUSPEND_EVENTS_NODE. |
SUSPEND_CALLBACK_PHASE_START_AT | suspend_callbacks_started_at_ns |
String |
Timestamp in nanos, for the start of suspend callback processing. Suspend is gated on phase completion. Event is recorded in SUSPEND_EVENTS_NODE. |
SUSPEND_EVENTS_NODE | suspend_events |
String |
Label of an inspect node tallying suspend events. |
SUSPEND_FAILED_AT | failed_at_ns |
String |
Timestamp in nanos for resume, after an unsuccessful suspend. |
SUSPEND_FAIL_COUNT | fail_count |
String |
The number of failed suspends. |
SUSPEND_LAST_DURATION | last_time_in_suspend_operations |
String |
The duration of time last spent in operations leading to suspend, excluding the time actually spent suspended. TODO: b/354239403 - make this string also end with |
SUSPEND_LAST_FAILED_ERROR | last_failed_error |
String |
The error code related to the last suspend operation. |
SUSPEND_LAST_TIMESTAMP | last_time_in_suspend_ns |
String |
The duration of time last spent in suspend. |
SUSPEND_LOCK_ACQUIRED_AT | suspend_lock_acquired_at_ns |
String |
Timestamp in nanos for when suspend requests will be blocked because a suspend lock is acquired. This event occurs right before a request to the suspend HAL is made. |
SUSPEND_LOCK_DROPPED_AT | suspend_lock_dropped_at_ns |
String |
Timestamp in nanos for when a suspend lock is dropped. This event occurs after a response from the suspend HAL is received and handled by SAG. |
SUSPEND_REQUESTED_STATE | requested_power_state |
String |
The requested future system state. |
SUSPEND_RESUMED_AT | resumed_at_ns |
String |
Timestamp in nanos for resume, after a successful suspend. |
SUSPEND_STATS_NODE | suspend_stats |
String |
Label of an inspect node keeping suspend statistics. |
SUSPEND_SUCCESS_COUNT | success_count |
String |
The number of successful suspends. |
WAKE_LEASES_NODE | wake_leases |
String |
The current state of wake leases, as tracked by SAG. The wake lease event history is tracked separately in SUSPEND_EVENTS_NODE. |
WAKE_LEASE_CREATED_AT | wake_lease_created_at_ns |
String |
Timestamp in nanos for when a wake lease was created. |
WAKE_LEASE_DROPPED_AT | wake_lease_dropped_at_ns |
String |
Timestamp in nanos for a wake lease is dropped. |
WAKE_LEASE_ITEM_CLIENT_TOKEN_KOID | wake_lease_client_token_koid |
String |
The kernel object ID of the token vended to the client. |
WAKE_LEASE_ITEM_ERROR | error |
String |
The error message. For example, if the underlying power broker lease failed to be satisfied. |
WAKE_LEASE_ITEM_NAME | wake_lease_name |
String |
The name of the wake lease as requested by the client. |
WAKE_LEASE_ITEM_NODE_CREATED_AT | wake_lease_created_at |
String |
The time since boot when the wake lease was created in nanoseconds. |
WAKE_LEASE_ITEM_STATUS | wake_lease_status |
String |
The status of the wake lease. |
WAKE_LEASE_ITEM_STATUS_AWAITING_SATISFACTION | pending |
String |
Lease requested in power broker is awaiting satisfaction in the power topology. |
WAKE_LEASE_ITEM_STATUS_FAILED_SATISFACTION | failed |
String |
Lease requested in power broker failed to be satisfied. |
WAKE_LEASE_ITEM_STATUS_SATISFIED | satisfied |
String |
Lease requested in power broker is satisfied by the current state of the power topology. |
WAKE_LEASE_ITEM_TYPE | wake_lease_type |
String |
The type of wake lease. |
WAKE_LEASE_ITEM_TYPE_APPLICATION_ACTIVITY | application_activity |
String |
Lease that blocks the system from dropping below the Application Activity 'Active' state. |
WAKE_LEASE_ITEM_TYPE_WAKE | wake |
String |
Lease that blocks suspension of the hardware platform. |
WAKE_LEASE_SATISFACTION_FAILED_AT | wake_lease_satisfaction_failed_at_ns |
String |
Timestamp in nanos for when a wake lease failed to be satisfied by power broker. |
WAKE_LEASE_SATISFIED_AT | wake_lease_satisfied_at_ns |
String |
Timestamp in nanos for when a wake lease is satisfaction with power broker. |