Skip to content
Snippets Groups Projects
Commit ac1a86db authored by Florent Kirchner's avatar Florent Kirchner Committed by Virgile Prevosto
Browse files

Add FlameGraph parameter

parent 2a7804f8
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,9 @@ module Gen_draft: Parameter_sig.Bool ...@@ -13,6 +13,9 @@ module Gen_draft: Parameter_sig.Bool
(** Value of [-mdr-remarks]. *) (** Value of [-mdr-remarks]. *)
module Remarks: Parameter_sig.String module Remarks: Parameter_sig.String
(** Value of [-mdr-flamegraph]. *)
module FlameGraph: Parameter_sig.String
(** Value of [-mdr-authors]. *) (** Value of [-mdr-authors]. *)
module Authors: Parameter_sig.String_list module Authors: Parameter_sig.String_list
......
...@@ -411,26 +411,30 @@ let gen_section_alarms is_draft = ...@@ -411,26 +411,30 @@ let gen_section_alarms is_draft =
H1 (plain "Results of the analysis", Some "alarms") :: text_content H1 (plain "Results of the analysis", Some "alarms") :: text_content
let gen_section_callgraph is_draft = let gen_section_callgraph is_draft =
let content = let f = Mdr_params.FlameGraph.get () in
if is_draft then if f = "" then []
Comment else begin
"flamegraph allow to visualize the functions and callstacks \ let content =
whose analysis is the most costly." if is_draft then
:: insert_marks Comment
else "A flamegraph provides a visualization of the functions and callstacks \
[ whose analysis is the most costly."
Block [ :: insert_marks
Text [ else
Plain "The image below shows the flamegraph ("; [
plain_link "http://www.brendangregg.com/flamegraphs.html"; Block [
Plain ") for the chosen entry point." Text [
] Plain "The image below shows the flamegraph (";
]; plain_link "http://www.brendangregg.com/flamegraphs.html";
Block Plain ") for the chosen entry point."
[ Text [Image ("flamegraph", "../server.flamegraph.svg")] ] ]
] ];
in Block
H1 (plain "Flamegraph", Some "flamegraph") :: content [ Text [Image ("flamegraph", f)] ]
]
in
H1 (plain "Flamegraph", Some "flamegraph") :: content
end
let gen_section_postlude is_draft = let gen_section_postlude is_draft =
if is_draft then if is_draft then
......
...@@ -39,6 +39,17 @@ struct ...@@ -39,6 +39,17 @@ struct
end end
) )
module FlameGraph = Empty_string(
struct
let option_name = "-mdr-flamegraph"
let arg_name = "f"
let help =
"reads file <f> to include a FlameGraph (https://github.com/brendangregg/FlameGraph.git),\
allowing the most analysis-intensive callstacks to be identified\
quickly and accurately"
end
)
module Authors = String_list( module Authors = String_list(
struct struct
let option_name = "-mdr-authors" let option_name = "-mdr-authors"
......
...@@ -12,6 +12,9 @@ module Gen_draft: Parameter_sig.Bool ...@@ -12,6 +12,9 @@ module Gen_draft: Parameter_sig.Bool
(** Value of [-mdr-remarks]. *) (** Value of [-mdr-remarks]. *)
module Remarks: Parameter_sig.String module Remarks: Parameter_sig.String
(** Value of [-mdr-flamegraph]. *)
module FlameGraph: Parameter_sig.String
(** Value of [-mdr-authors]. *) (** Value of [-mdr-authors]. *)
module Authors: Parameter_sig.String_list module Authors: Parameter_sig.String_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment