Skip to content

Commit ac3074d

Browse files
authored
few corrections (#147)
Signed-off-by: rajulu <rajulu@qti.qualcomm.com>
1 parent 0ea5dce commit ac3074d

3 files changed

Lines changed: 43 additions & 28 deletions

File tree

contextual-classifier/ContextualClassifier.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void ContextualClassifier::ClassifierMain() {
204204

205205
if(ev.type == CC_APP_OPEN) {
206206
std::string comm;
207-
uint32_t sigId = CONSTRUCT_SIG_CODE(URM_SIG_CAT_GENERIC, URM_SIG_APP_OPEN);
207+
uint32_t sigId = URM_SIG_APP_OPEN;
208208
uint32_t sigType = DEFAULT_SIGNAL_TYPE;
209209
uint32_t ctxDetails = 0U;
210210

@@ -367,17 +367,17 @@ void ContextualClassifier::RemoveActions(pid_t processPid, pid_t processTgid) {
367367
uint32_t ContextualClassifier::GetSignalIDForWorkload(int32_t contextType) {
368368
switch(contextType) {
369369
case CC_MULTIMEDIA:
370-
return CONSTRUCT_SIG_CODE(URM_SIG_CAT_MULTIMEDIA, URM_SIG_MULTIMEDIA_APP_OPEN);
370+
return URM_SIG_MULTIMEDIA_APP_OPEN;
371371
case CC_GAME:
372-
return CONSTRUCT_SIG_CODE(URM_SIG_CAT_GAMING, URM_SIG_GAME_APP_OPEN);
372+
return URM_SIG_GAME_APP_OPEN;
373373
case CC_BROWSER:
374-
return CONSTRUCT_SIG_CODE(URM_SIG_CAT_BROWSER, URM_SIG_BROWSER_APP_OPEN);
374+
return URM_SIG_BROWSER_APP_OPEN;
375375
default:
376376
break;
377377
}
378378

379379
// CC_APP
380-
return CONSTRUCT_SIG_CODE(URM_SIG_CAT_GENERIC, URM_SIG_APP_OPEN);
380+
return URM_SIG_APP_OPEN;
381381
}
382382

383383
void ContextualClassifier::LoadIgnoredProcesses() {

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ The following signal codes are supported signals. Target or segment specific cus
201201

202202
| Signal Code | Code |
203203
|-------------------------------|-----------------|
204-
| URM_SIG_APP_OPEN | 0x 00 02 0000 |
205-
| URM_SIG_BROWSER_APP_OPEN | 0x 00 02 0001 |
206-
| URM_SIG_GAME_APP_OPEN | 0x 00 02 0002 |
207-
| URM_SIG_MULTIMEDIA_APP_OPEN | 0x 00 02 0003 |
204+
| URM_SIG_APP_OPEN | 0x 00 02 0001 |
205+
| URM_SIG_BROWSER_APP_OPEN | 0x 00 02 0002 |
206+
| URM_SIG_GAME_APP_OPEN | 0x 00 02 0003 |
207+
| URM_SIG_MULTIMEDIA_APP_OPEN | 0x 00 02 0004 |
208208

209209
The above mentioned list of enums are available in the interface file "UrmPlatformAL.h".
210210

@@ -1379,8 +1379,8 @@ The Contextual Classifier is an optional module designed to identify the static
13791379
|
13801380
v
13811381
+--------------+
1382-
| Action |
1383-
+--------------+
1382+
| Action |
1383+
+--------------+
13841384
```
13851385
13861386

modula/Common/Include/UrmPlatformAL.h

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -231,30 +231,45 @@ static inline uint32_t getResCodeFromString(const char* strCode, int8_t* found)
231231
return 0;
232232
}
233233

234-
// Predefined Signal Categories
234+
//Predefined Resource Types
235235
enum {
236-
URM_SIG_CAT_TEST = 0x01,
237-
URM_SIG_CAT_GENERIC = 0x02,
238-
URM_SIG_CAT_MULTIMEDIA = 0x03,
239-
URM_SIG_CAT_GAMING = 0x04,
240-
URM_SIG_CAT_BROWSER = 0x05,
236+
CPU_LPM = 0x00,
237+
CACHE_MGMT = 0x01,
238+
CPU_SCHED = 0x02,
239+
CPU_FREQ = 0x03,
240+
GPU_OPP = 0x04,
241+
NPU_OPP = 0x06,
242+
MEMORY_QOS = 0x07,
243+
MPAM_QOS = 0x08,
244+
CGRP_OPS = 0x09,
245+
STORAGE_IO = 0x0a,
246+
CUSTOM = 0x80
241247
};
242248

243-
// Generic
249+
// Predefined Signal Categories
244250
enum {
245-
URM_SIG_APP_OPEN = 0x0001,
246-
URM_SIG_BROWSER_APP_OPEN = 0x0002,
247-
URM_SIG_GAME_APP_OPEN = 0x0003,
248-
URM_SIG_MULTIMEDIA_APP_OPEN = 0x0004,
251+
URM_SIG_CAT_TEST = 0x01,
252+
URM_SIG_CAT_GENERIC = 0x02,
253+
URM_SIG_CAT_MULTIMEDIA = 0x03,
254+
URM_SIG_CAT_GAMING = 0x04,
255+
URM_SIG_CAT_BROWSER = 0x05,
256+
URM_SIG_CAT_CUSTOM = 0x80
249257
};
250258

251-
// Multimedia
259+
//Signal codes
252260
enum {
253-
URM_SIG_VIDEO_DECODE = 0x0001,
254-
URM_SIG_CAMERA_PREVIEW = 0x0002,
255-
URM_SIG_CAMERA_ENCODE = 0x0003,
256-
URM_SIG_CAMERA_ENCODE_MULTI_STREAMS = 0x0004,
257-
URM_SIG_ENCODE_DECODE = 0x0005,
261+
// Generic
262+
URM_SIG_APP_OPEN = 0x00020001,
263+
URM_SIG_BROWSER_APP_OPEN = 0x00020002,
264+
URM_SIG_GAME_APP_OPEN = 0x00020003,
265+
URM_SIG_MULTIMEDIA_APP_OPEN = 0x00020004,
266+
267+
// Multimedia
268+
URM_SIG_VIDEO_DECODE = 0x00030001,
269+
URM_SIG_CAMERA_PREVIEW = 0x00030002,
270+
URM_SIG_CAMERA_ENCODE = 0x00030003,
271+
URM_SIG_CAMERA_ENCODE_MULTI_STREAMS = 0x00030004,
272+
URM_SIG_ENCODE_DECODE = 0x00030005,
258273
};
259274

260275
#endif

0 commit comments

Comments
 (0)