summaryrefslogtreecommitdiff
path: root/core/java/android/util/Slog.java
Commit message (Collapse)AuthorAgeFilesLines
* Promote Slog to @SystemApi(client = Client.MODULE_LIBS)Nikita Ioffe2022-02-101-30/+180
| | | | | | | Bug: 218862380 Fixes: 218862380 Test: m Change-Id: I8ae8968471130e87abff14593a992229e683b034
* Removed Slog methods that support message formatting.Felipe Leme2021-04-061-173/+0
| | | | | | | | | | | | | Slog is a core class provided by frameworks.jar, and these new methods were causing performance regressions, so they were moved to a system_server only class (com.android.server.utils.Slogf). Test: m Fixes: 183523451 Bug: 182476140 Change-Id: I511dd57faee194b58cf77c0c39c92dd0e876566e
* Moved string-formatting methods from Slog to Slogf.Felipe Leme2021-04-021-0/+27
| | | | | | | | | | | | | Slog is a core class provided by frameworks.jar, and these new methods were causing performance regressions, so they were moved to a system_server only class. Bug: 182476140 Bug: 183523451 Test: atest --rebuild-module-info FrameworksMockingServicesTests:SLogfTest Change-Id: I98cbb122d5410b61812edc85162aa6b10b995fdc
* Merge "Added Warning about extra object allocation on SLog methods." into sc-devFelipe Leme2021-03-231-0/+42
|\
| * Added Warning about extra object allocation on SLog methods.Felipe Leme2021-03-161-0/+42
| | | | | | | | | | | | Test: m Bug: 182476140 Change-Id: Id210956dcc060f0570d1f5c95e11e0effc7d0d24
* | Add docs to Slog class.Zhomart Mukhamejanov2021-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | Docs will be super useful, especially to new developers. I see several docs and questions inside/outside google asking what is it and when to use it. Bug: 182476140 Test: m -j Change-Id: Ibb41ab0b6fd808f2a1e5475103860fc415a502d6
* | Lazy load the allocation of Slog message formatting objects.Felipe Leme2021-03-191-5/+10
|/ | | | | | | Test: manual verification looking at logcat output Fixes: 182963900 Change-Id: If62ccfe085b20cda8755fefc3ec757ad59986685
* Overloaded Slog methods with versions that support string formatting.Felipe Leme2021-03-111-1/+99
| | | | | | | Test: none Fixes: 182476140 Change-Id: I60c8ca83f09b9da02c3ef20bcc5f88aec5204e74
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-2/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+2
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-2/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-071-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
* Limit access to suspected false positives.Mathew Inwood2018-12-281-1/+2
| | | | | | | | | | | | | | | | | | | | | Members modified herein are suspected to be false positives: i.e. things that were added to the greylist in P, but subsequent data analysis suggests that they are not, in fact, used after all. Add a maxTargetSdk=P to these APIs. This is lower-risk that simply removing these things from the greylist, as none of out data sources are perfect nor complete. For APIs that are not supported yet by annotations, move them to hiddenapi-greylist-max-p.txt instead which has the same effect. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+14
| | | | | | | | | | | | | | | | | | | For packages: android.util.proto android.util.jar android.util.apk android.util This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ia0f48c244b0fbe33d40d797702a82303648196ed
* Fix issue #17323751: Additional items in aggregated battery statsDianne Hackborn2014-12-051-0/+7
| | | | | | | | | | | | | | | - Now aggregate number of times each process has crashed and ANRed. - Now aggregate total number of connectivity changes. - Now record connectivity changes in the history. Crash and ANR counts are new entries at the end of "pr" in checkin. Connectivity change counts is a new entry at the end of "m" in checkin. Connectivity changes in the history checkin are Ecn and include the type of connection and its state. Change-Id: I0c01186446034cf6c3fb97d45f5e3b5c69a0438a
* More work on issue #17656716: Unhandled exception in Window ManagerDianne Hackborn2014-10-011-0/+20
| | | | | | | | | | | | | | | | | | | | | Fix Slog.wtf to not acquire the activity manager lock in its code path, so that it can never deadlock. This was the original intention of it, but part was missed. Now we can put back in the code to detect when strict mode data is getting large (a little more targeted now to the actual problem), and use Slog.wtf to report it. And as a bonus, when this happens we will now clear all of the collected violations, to avoid getting in to the bad case where IPCs start failing. So this should be good enough for L to fix the problem, with wtf reports for us to see if the underlying issue is still happening. Finally, switch a butch of stuff in the system process from Log.wtf to Slog.wtf, since many of those are deadlocks waiting to happen. Oh and fix a crash in the settings provider I noticed in APR. Change-Id: I307d51b7a4db238fd1e5fe2f3f9bf1b9c6f1c041
* Fix issue #17146552: system anrDianne Hackborn2014-08-261-4/+4
| | | | | | | Add a safe path for Slog.wtf that doesn't acquire an activity manager lock or block in any way. Change-Id: I8fef8251a0cb85081442cae55d85063944248d15
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-5/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Fix issue #11223335: APR: Lots of failures in procstats due to...Dianne Hackborn2013-10-141-4/+4
| | | | | | | | | | | | ...bad cleanup of crashing processes We now have a special path for crashing processes, to silently clean up their state. Also some tweaks to Log/Slog.wtf to get better stack crawl summaries in APR. Change-Id: Ieced26989907a6e7615b6fa033813fced78d7474
* Fix issue #11005453: [SUW] G+ profile creation for new user brokenDianne Hackborn2013-10-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main problem here was a mistake when turning a single process structure to a multi-package-process structure with a common process. When we cloned the original process state, if there were any services already created for the process for that package, they would be left with their process pointer still referencing the original now common process instead of the package-specific process, allowing the active counts to get bad. Now we switch any of those processes over to the new package-specific process. There was also another smaller issue with how ServiceRecord is associated with a ServiceState -- we could be waiting for an old ServiceRecord to be destroyed while at the same time creating a new ServiceRecord for that same service class. These would share the same ServiceState, so when the old record finally finished destroying itself it would trample over whatever the new service is doing. This is fixed by changing the model to instead of using an "active" reference count, we have an object identifying the current owner of the ServiceState. Then when the old ServiceRecord is cleaning up, we know if it is still the owner at that point. Also some other small things along the way -- new Log.wtfStack() method that is convenient, new suite of Slog.wtf methods, fixed some services to use Slog.wtf when catching exceptions being returned to the caller so that we actually know about them. Change-Id: I75674ce38050b6423fd3c6f43d1be172b470741f
* Add new Slog class.Joe Onorato2010-03-011-0/+85