Discussion:
[Cocci] Evolution around profiling of SmPL script execution
SF Markus Elfring
2018-05-26 20:33:36 UTC
Permalink
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
SF Markus Elfring
2018-06-01 13:51:25 UTC
Permalink
Post by SF Markus Elfring
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
SF Markus Elfring
2018-06-01 11:13:18 UTC
Permalink
Post by SF Markus Elfring
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?

diff --git a/cocci.ml b/cocci.ml
index 64503ee9..43cfc996 100644
--- a/cocci.ml
+++ b/cocci.ml
@@ -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

Loading...