All of lore.kernel.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: cocci@systeme.lip6.fr
Subject: [Cocci] Evolution around profiling of SmPL script execution
Date: Fri, 1 Jun 2018 13:13:18 +0200	[thread overview]
Message-ID: <9cb37b5c-bc0b-de6a-7495-95de0971aa6f@users.sourceforge.net> (raw)
In-Reply-To: <595d32bf-e506-614a-f1d1-3295a0322647@users.sourceforge.net>

>    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

  reply	other threads:[~2018-06-01 11:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-26 20:33 [Cocci] Evolution around profiling of SmPL script execution SF Markus Elfring
2018-06-01 11:13 ` SF Markus Elfring [this message]
2018-06-01 13:51 ` SF Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cb37b5c-bc0b-de6a-7495-95de0971aa6f@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.