@@ -262,9 +262,9 @@ trace_boot_hist_add_one_handler(struct xbc_node *hnode, char **bufp,
262
262
append_printf (bufp , end , ":%s(%s)" , handler , p );
263
263
264
264
/* Compose 'action' parameter */
265
- knode = xbc_node_find_child (hnode , "trace" );
265
+ knode = xbc_node_find_subkey (hnode , "trace" );
266
266
if (!knode )
267
- knode = xbc_node_find_child (hnode , "save" );
267
+ knode = xbc_node_find_subkey (hnode , "save" );
268
268
269
269
if (knode ) {
270
270
anode = xbc_node_get_child (knode );
@@ -283,7 +283,7 @@ trace_boot_hist_add_one_handler(struct xbc_node *hnode, char **bufp,
283
283
sep = ',' ;
284
284
}
285
285
append_printf (bufp , end , ")" );
286
- } else if (xbc_node_find_child (hnode , "snapshot" )) {
286
+ } else if (xbc_node_find_subkey (hnode , "snapshot" )) {
287
287
append_printf (bufp , end , ".snapshot()" );
288
288
} else {
289
289
pr_err ("hist.%s requires an action.\n" ,
@@ -314,7 +314,7 @@ trace_boot_hist_add_handlers(struct xbc_node *hnode, char **bufp,
314
314
break ;
315
315
}
316
316
317
- if (xbc_node_find_child (hnode , param ))
317
+ if (xbc_node_find_subkey (hnode , param ))
318
318
ret = trace_boot_hist_add_one_handler (hnode , bufp , end , handler , param );
319
319
320
320
return ret ;
@@ -374,7 +374,7 @@ trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
374
374
if (p )
375
375
append_printf (& buf , end , ":name=%s" , p );
376
376
377
- node = xbc_node_find_child (hnode , "var" );
377
+ node = xbc_node_find_subkey (hnode , "var" );
378
378
if (node ) {
379
379
xbc_node_for_each_key_value (node , knode , p ) {
380
380
/* Expression must not include spaces. */
@@ -393,13 +393,13 @@ trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
393
393
append_printf (& buf , end , ":clear" );
394
394
395
395
/* Histogram handler and actions */
396
- node = xbc_node_find_child (hnode , "onmax" );
396
+ node = xbc_node_find_subkey (hnode , "onmax" );
397
397
if (node && trace_boot_hist_add_handlers (node , & buf , end , "var" ) < 0 )
398
398
return - EINVAL ;
399
- node = xbc_node_find_child (hnode , "onchange" );
399
+ node = xbc_node_find_subkey (hnode , "onchange" );
400
400
if (node && trace_boot_hist_add_handlers (node , & buf , end , "var" ) < 0 )
401
401
return - EINVAL ;
402
- node = xbc_node_find_child (hnode , "onmatch" );
402
+ node = xbc_node_find_subkey (hnode , "onmatch" );
403
403
if (node && trace_boot_hist_add_handlers (node , & buf , end , "event" ) < 0 )
404
404
return - EINVAL ;
405
405
@@ -436,7 +436,7 @@ trace_boot_init_histograms(struct trace_event_file *file,
436
436
}
437
437
}
438
438
439
- if (xbc_node_find_child (hnode , "keys" )) {
439
+ if (xbc_node_find_subkey (hnode , "keys" )) {
440
440
if (trace_boot_compose_hist_cmd (hnode , buf , size ) == 0 ) {
441
441
tmp = kstrdup (buf , GFP_KERNEL );
442
442
if (trigger_process_regex (file , buf ) < 0 )
@@ -495,7 +495,7 @@ trace_boot_init_one_event(struct trace_array *tr, struct xbc_node *gnode,
495
495
else if (trigger_process_regex (file , buf ) < 0 )
496
496
pr_err ("Failed to apply an action: %s\n" , p );
497
497
}
498
- anode = xbc_node_find_child (enode , "hist" );
498
+ anode = xbc_node_find_subkey (enode , "hist" );
499
499
if (anode )
500
500
trace_boot_init_histograms (file , anode , buf , ARRAY_SIZE (buf ));
501
501
} else if (xbc_node_find_value (enode , "actions" , NULL ))
@@ -517,7 +517,7 @@ trace_boot_init_events(struct trace_array *tr, struct xbc_node *node)
517
517
bool enable , enable_all = false;
518
518
const char * data ;
519
519
520
- node = xbc_node_find_child (node , "event" );
520
+ node = xbc_node_find_subkey (node , "event" );
521
521
if (!node )
522
522
return ;
523
523
/* per-event key starts with "event.GROUP.EVENT" */
@@ -620,7 +620,7 @@ trace_boot_init_instances(struct xbc_node *node)
620
620
struct trace_array * tr ;
621
621
const char * p ;
622
622
623
- node = xbc_node_find_child (node , "instance" );
623
+ node = xbc_node_find_subkey (node , "instance" );
624
624
if (!node )
625
625
return ;
626
626
0 commit comments