Skip to contentSkip to conversation

Evolution around profiling of SmPL script execution

Cocci SF Markus Elfring 1 participant 3 messages May 26, 2018 – Jun 1, 2018

lore
Share & tools
lore
#0 lore raw

Hello,

The Coccinelle software supports profiling for the execution of SmPL scripts to some degree.
I find the corresponding description improvable for the provided data.

1. I would find an other separation for the available columns nicer.

2. I suggest to add a column ?area? so that the measured data processing can be distinguished better.
How should the execution of each SmPL rule be identified there?

3. The output of measurement units could be occasionally omitted.

Will the display become more configurable for these software profiling results?

Regards,
Markus

#1 lore raw
Quoted 1 line

How should the execution of each SmPL rule be identified there?

Can the following source code adjustment help a bit besides the general possibility to clarify additional data export formats?

cocci.ml +1 -1
index 64503ee9..43cfc996 100644
@@ -1563,7 +1563,7 @@ let printtime str = Printf.printf "%s: %f\n" str (Unix.gettimeofday ())
 
 let rec apply_cocci_rule r rules_that_have_ever_matched parse_strings es
     (ccs:file_info list ref) =
-  Common.profile_code r.rule_info.rulename (fun () ->
+  Common.profile_code ("Rule " ^ r.rule_info.rulename) (fun () ->
     show_or_not_rule_name r.ast_rule r.rule_info.ruleid;
     show_or_not_ctl_text r.ctl r.metavars r.ast_rule r.rule_info.ruleid;
 

Regards,
Markus

#2 lore raw
In reply to SF Markus Elfring
Quoted 1 line

I find the corresponding description improvable for the provided data.

How can it be achieved that the execution of SmPL rules will be measured also for supported scripting languages?

Will it be appropriate to execute these places by the function ?Common.profile_code??

Regards,
Markus