Searched defs:proto (Results 1 - 25 of 175) sorted by relevance

1234567

/frameworks/base/core/java/android/util/proto/
H A DProtoParseException.java17 package android.util.proto;
H A DProtoUtils.java17 package android.util.proto;
23 * This class contains a list of helper functions to write common proto in
24 * //frameworks/base/core/proto/android/base directory
32 public static void toAggStatsProto(ProtoOutputStream proto, long fieldId, argument
34 final long aggStatsToken = proto.start(fieldId);
35 proto.write(AggStats.MIN, min);
36 proto.write(AggStats.AVERAGE, average);
37 proto.write(AggStats.MAX, max);
38 proto.end(aggStatsToken);
45 public static void toDuration(ProtoOutputStream proto, lon argument
56 writeBitWiseFlagsToProtoEnum(ProtoOutputStream proto, long fieldId, int flags, int[] origEnums, int[] protoEnums) argument
[all...]
/frameworks/base/cmds/incident_helper/src/parsers/
H A DBatteryTypeParser.cpp20 #include "frameworks/base/core/proto/android/os/batterytype.proto.h"
33 ProtoOutputStream proto; local
44 proto.write(BatteryTypeProto::TYPE, line);
54 if (!proto.flush(out)) {
55 fprintf(stderr, "[%s]Error writing proto back\n", this->name.string());
58 fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
H A DKernelWakesParser.cpp20 #include "frameworks/base/core/proto/android/os/kernelwake.proto.h"
35 ProtoOutputStream proto; local
62 uint64_t token = proto.start(KernelWakeSourcesProto::WAKEUP_SOURCES);
64 if (!table.insertField(&proto, header[i], record[i])) {
69 proto.end(token);
77 if (!proto.flush(out)) {
78 fprintf(stderr, "[%s]Error writing proto back\n", this->name.string());
81 fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
H A DCpuFreqParser.cpp21 #include "frameworks/base/core/proto/android/os/cpufreq.proto.h"
62 ProtoOutputStream proto; local
65 proto.write(CpuFreqProto::JIFFY_HZ, (int)jiffyHz);
68 uint64_t token = proto.start(CpuFreqProto::CPU_FREQS);
69 proto.write(CpuFreqProto::Stats::CPU_NAME, header[i+1]);
71 uint64_t stateToken = proto.start(CpuFreqProto::Stats::TIMES);
72 proto.write(CpuFreqProto::Stats::TimeInState::STATE_KHZ, it->first);
73 proto.write(CpuFreqProto::Stats::TimeInState::TIME_JIFFY, it->second);
74 proto
[all...]
H A DEventLogTagsParser.cpp20 #include "frameworks/base/core/proto/android/util/event_log_tags.proto.h"
30 ProtoOutputStream proto; local
44 uint64_t token = proto.start(EventLogTagMapProto::EVENT_LOG_TAGS);
45 proto.write(EventLogTag::TAG_NUMBER, toInt(tagNumber));
46 proto.write(EventLogTag::TAG_NAME, tagName);
55 uint64_t descriptorToken = proto.start(EventLogTag::VALUE_DESCRIPTORS);
56 proto.write(EventLogTag::ValueDescriptor::NAME, valueDescriptor[0]);
57 proto.write(EventLogTag::ValueDescriptor::TYPE, toInt(valueDescriptor[1]));
66 proto
[all...]
H A DPageTypeInfoParser.cpp20 #include "frameworks/base/core/proto/android/os/pagetypeinfo.proto.h"
35 ProtoOutputStream proto; local
49 proto.write(PageTypeInfoProto::PAGE_BLOCK_ORDER, pageBlockOrder);
53 proto.write(PageTypeInfoProto::PAGES_PER_BLOCK, toInt(line));
67 uint64_t token = proto.start(PageTypeInfoProto::MIGRATE_TYPES);
70 proto.write(PageTypeInfoProto::MigrateType::NODE, toInt(record[0]));
74 proto.write(PageTypeInfoProto::MigrateType::ZONE, record[1]);
88 proto.write(PageTypeInfoProto::MigrateType::TYPE, pageCounts[0]);
90 proto
[all...]
H A DProcrankParser.cpp20 #include "frameworks/base/core/proto/android/os/procrank.proto.h"
35 ProtoOutputStream proto; local
69 uint64_t token = proto.start(ProcrankProto::PROCESSES);
71 if (!table.insertField(&proto, header[i], record[i])) {
76 proto.end(token);
80 uint64_t token = proto.start(ProcrankProto::SUMMARY);
83 uint64_t token = proto.start(ProcrankProto::Summary::TOTAL);
85 table.insertField(&proto, header[header.size() - i].c_str(), record[record.size() - i].c_str());
87 proto
[all...]
H A DSystemPropertiesParser.cpp20 #include "frameworks/base/core/proto/android/os/system_properties.proto.h"
28 // system properties' names sometimes are not valid proto field names, make the names valid.
48 ProtoOutputStream proto; local
200 // if the property name couldn't be found in proto definition or the value has mistype,
202 if (!sysProp.insertField(&proto, convertToFieldName(name), value)) {
207 sysProp.endSession(&proto);
210 uint64_t token = proto.start(SystemPropertiesProto::EXTRA_PROPERTIES);
211 proto.write(SystemPropertiesProto::Property::NAME, it->first);
212 proto
[all...]
H A DPsParser.cpp20 #include "frameworks/base/core/proto/android/os/ps.proto.h"
35 ProtoOutputStream proto; local
74 uint64_t token = proto.start(PsProto::PROCESSES);
76 if (!table.insertField(&proto, header[i], record[i])) {
81 proto.end(token);
89 if (!proto.flush(out)) {
90 fprintf(stderr, "[%s]Error writing proto back\n", this->name.string());
93 fprintf(stderr, "[%s]Proto size: %zu bytes\n", this->name.string(), proto.size());
H A DCpuInfoParser.cpp20 #include "frameworks/base/core/proto/android/os/cpuinfo.proto.h"
26 static void writeSuffixLine(ProtoOutputStream* proto, uint64_t fieldId, argument
31 uint64_t token = proto->start(fieldId);
35 proto->write(ids[j], toInt(record[i]));
40 proto->end(token);
56 ProtoOutputStream proto; local
70 writeSuffixLine(&proto, CpuInfoProto::TASK_STATS, line, COMMA_DELIMITER,
77 writeSuffixLine(&proto, CpuInfoProto::MEM, line, COMMA_DELIMITER,
84 writeSuffixLine(&proto, CpuInfoProt
[all...]
/frameworks/base/services/core/java/com/android/server/power/
H A DSuspendBlocker.java19 import android.util.proto.ProtoOutputStream;
46 void writeToProto(ProtoOutputStream proto, long fieldId); argument
/frameworks/base/core/java/com/android/internal/util/dump/
H A DDumpUtils.java26 * Write a string to a proto if the string is not {@code null}.
28 * @param proto The proto to write to
29 * @param idName Clear text name of the proto-id
30 * @param id The proto-id of the string
33 public static void writeStringIfNotNull(@NonNull DualDumpOutputStream proto, String idName, argument
36 proto.write(idName, id, string);
41 * Write a {@link ComponentName} to a proto.
43 * @param proto The proto t
48 writeComponentName(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull ComponentName component) argument
[all...]
/frameworks/base/core/java/com/android/internal/util/
H A DLocalLog.java23 import android.util.proto.ProtoOutputStream;
68 public void writeToProto(ProtoOutputStream proto, long fieldId) { argument
69 final long token = proto.start(fieldId);
73 proto.write(LocalLogProto.LINES, mLines.get(i));
77 proto.end(token);
H A DStatLogger.java21 import android.util.proto.ProtoOutputStream;
155 public void dumpProto(ProtoOutputStream proto, long fieldId) { argument
157 final long outer = proto.start(fieldId);
160 final long inner = proto.start(StatLoggerProto.EVENTS);
162 proto.write(Event.EVENT_ID, i);
163 proto.write(Event.LABEL, mLabels[i]);
164 proto.write(Event.COUNT, mCountStats[i]);
165 proto.write(Event.TOTAL_DURATION_MICROS, mDurationStats[i]);
167 proto.end(inner);
170 proto
[all...]
/frameworks/base/services/core/java/com/android/server/am/
H A DAppBindRecord.java20 import android.util.proto.ProtoOutputStream;
65 void writeToProto(ProtoOutputStream proto, long fieldId) { argument
66 long token = proto.start(fieldId);
67 proto.write(AppBindRecordProto.SERVICE_NAME, service.shortName);
68 proto.write(AppBindRecordProto.CLIENT_PROC_NAME, client.processName);
72 proto.write(AppBindRecordProto.CONNECTIONS,
75 proto.end(token);
H A DActiveInstrumentation.java25 import android.util.proto.ProtoOutputStream;
124 void writeToProto(ProtoOutputStream proto, long fieldId) { argument
125 long token = proto.start(fieldId);
126 mClass.writeToProto(proto, ActiveInstrumentationProto.CLASS);
127 proto.write(ActiveInstrumentationProto.FINISHED, mFinished);
129 mRunningProcesses.get(i).writeToProto(proto,
133 proto.write(ActiveInstrumentationProto.TARGET_PROCESSES, p);
136 mTargetInfo.writeToProto(proto, ActiveInstrumentationProto.TARGET_INFO);
138 proto.write(ActiveInstrumentationProto.PROFILE_FILE, mProfileFile);
139 proto
[all...]
H A DAppTimeTracker.java28 import android.util.proto.ProtoOutputStream;
29 import android.util.proto.ProtoUtils;
125 void writeToProto(ProtoOutputStream proto, long fieldId, boolean details) { argument
126 final long token = proto.start(fieldId);
127 proto.write(AppTimeTrackerProto.RECEIVER, mReceiver.toString());
128 proto.write(AppTimeTrackerProto.TOTAL_DURATION_MS, mTotalTime);
130 final long ptoken = proto.start(AppTimeTrackerProto.PACKAGE_TIMES);
131 proto.write(AppTimeTrackerProto.PackageTime.PACKAGE, mPackageTimes.keyAt(i));
132 proto.write(AppTimeTrackerProto.PackageTime.DURATION_MS, mPackageTimes.valueAt(i).value);
133 proto
[all...]
H A DConnectionRecord.java22 import android.util.proto.ProtoOutputStream;
23 import android.util.proto.ProtoUtils;
161 public void writeToProto(ProtoOutputStream proto, long fieldId) { argument
163 long token = proto.start(fieldId);
164 proto.write(ConnectionRecordProto.HEX_HASH,
167 proto.write(ConnectionRecordProto.USER_ID, binding.client.userId);
169 ProtoUtils.writeBitWiseFlagsToProtoEnum(proto, ConnectionRecordProto.FLAGS,
172 proto.write(ConnectionRecordProto.FLAGS, ConnectionRecordProto.DEAD);
175 proto.write(ConnectionRecordProto.SERVICE_NAME, binding.service.shortName);
177 proto
[all...]
H A DIntentBindRecord.java24 import android.util.proto.ProtoOutputStream;
111 public void writeToProto(ProtoOutputStream proto, long fieldId) { argument
112 long token = proto.start(fieldId);
114 intent.getIntent().writeToProto(proto,
118 proto.write(IntentBindRecordProto.BINDER, binder.toString());
120 proto.write(IntentBindRecordProto.AUTO_CREATE,
122 proto.write(IntentBindRecordProto.REQUESTED, requested);
123 proto.write(IntentBindRecordProto.RECEIVED, received);
124 proto.write(IntentBindRecordProto.HAS_BOUND, hasBound);
125 proto
[all...]
/frameworks/base/cmds/statsd/tests/
H A DUidMap_test.cpp163 static void protoOutputStreamToUidMapping(ProtoOutputStream* proto, UidMapping* results) { argument
165 bytes.resize(proto->size());
167 auto iter = proto->data();
195 ProtoOutputStream proto; local
196 m.appendUidMap(3, config1, nullptr, &proto);
200 protoOutputStreamToUidMapping(&proto, &results);
218 ProtoOutputStream proto; local
219 m.appendUidMap(3, config1, nullptr, &proto);
223 protoOutputStreamToUidMapping(&proto, &results);
246 ProtoOutputStream proto; local
283 ProtoOutputStream proto; local
344 ProtoOutputStream proto; local
[all...]
/frameworks/base/core/java/android/content/pm/
H A DFeatureInfo.java21 import android.util.proto.ProtoOutputStream;
118 public void writeToProto(ProtoOutputStream proto, long fieldId) { argument
119 long token = proto.start(fieldId);
121 proto.write(FeatureInfoProto.NAME, name);
123 proto.write(FeatureInfoProto.VERSION, version);
124 proto.write(FeatureInfoProto.GLES_VERSION, getGlEsVersion());
125 proto.write(FeatureInfoProto.FLAGS, flags);
126 proto.end(token);
/frameworks/base/core/java/com/android/internal/print/
H A DDumpUtils.java45 * Utilities for dumping print related proto buffer
49 * Write a {@link PrinterId} to a proto.
51 * @param proto The proto to write to
52 * @param idName Clear text name of the proto-id
53 * @param id The proto-id of the component name
56 public static void writePrinterId(@NonNull DualDumpOutputStream proto, String idName, long id, argument
58 long token = proto.start(idName, id);
59 writeComponentName(proto, "service_name", PrinterIdProto.SERVICE_NAME,
61 proto
73 writePrinterCapabilities(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrinterCapabilitiesInfo cap) argument
126 writePrinterInfo(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrinterInfo info) argument
153 writeMediaSize(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.MediaSize mediaSize) argument
171 writeResolution(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.Resolution res) argument
189 writeMargins(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes.Margins margins) argument
208 writePrintAttributes(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintAttributes attributes) argument
242 writePrintDocumentInfo(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintDocumentInfo info) argument
265 writePageRange(@onNull DualDumpOutputStream proto, String idName, long id, @NonNull PageRange range) argument
282 writePrintJobInfo(@onNull Context context, @NonNull DualDumpOutputStream proto, String idName, long id, @NonNull PrintJobInfo printJobInfo) argument
[all...]
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsProtoDumpUtil.java30 import android.util.proto.ProtoOutputStream;
37 ProtoOutputStream proto) {
42 dumpProtoGlobalSettingsLocked(proto, SettingsServiceDumpProto.GLOBAL_SETTINGS, globalSettings);
49 dumpProtoUserSettingsLocked(proto, SettingsServiceDumpProto.USER_SETTINGS,
55 * Dump all settings of a user as a proto buf.
59 * @param proto The proto buf stream to dump to
62 @NonNull ProtoOutputStream proto,
66 final long token = proto.start(fieldId);
68 proto
36 dumpProtoLocked(SettingsProvider.SettingsRegistry settingsRegistry, ProtoOutputStream proto) argument
61 dumpProtoUserSettingsLocked( @onNull ProtoOutputStream proto, long fieldId, SettingsProvider.SettingsRegistry settingsRegistry, @NonNull UserHandle user) argument
1485 dumpRepeatedSetting(@onNull SettingsState settings, @NonNull ProtoOutputStream proto, String settingPrefix, long fieldId) argument
1495 dumpSetting(@onNull SettingsState settings, @NonNull ProtoOutputStream proto, String settingName, long fieldId) argument
[all...]
/frameworks/base/services/core/java/com/android/server/
H A DDiskStatsService.java35 import android.util.proto.ProtoOutputStream;
93 boolean protoFormat = hasOption(args, "--proto");
94 ProtoOutputStream proto = null;
97 proto = new ProtoOutputStream(fd);
99 proto.write(DiskStatsServiceDumpProto.HAS_TEST_ERROR, error != null);
101 proto.write(DiskStatsServiceDumpProto.ERROR_MESSAGE, error.toString());
103 proto.write(DiskStatsServiceDumpProto.WRITE_512B_LATENCY_MILLIS, after - before);
117 reportDiskWriteSpeedProto(proto);
122 reportFreeSpace(Environment.getDataDirectory(), "Data", pw, proto,
124 reportFreeSpace(Environment.getDownloadCacheDirectory(), "Cache", pw, proto,
159 reportFreeSpace(File path, String name, PrintWriter pw, ProtoOutputStream proto, int folderType) argument
244 reportCachedValuesProto(ProtoOutputStream proto) argument
323 reportDiskWriteSpeedProto(ProtoOutputStream proto) argument
[all...]

Completed in 302 milliseconds

1234567