@@ -75,6 +75,7 @@ void print_usage(const string progname)
75
75
cerr << " -tr | /tr => transpose output (print single event data in a row)\n " ;
76
76
cerr << " -ext => add headers to transposed output and extend printout to match it\n " ;
77
77
cerr << " -s | /s => print a sample separator line between samples in transposed output\n " ;
78
+ cerr << " -v | /v => verbose mode (print additional diagnostic messages)\n " ;
78
79
cerr << " -l => use locale for printing values, calls -tab for readability\n " ;
79
80
cerr << " -tab => replace default comma separator with tab\n " ;
80
81
cerr << " -el event_list.txt | /el event_list.txt => read event list from event_list.txt file, \n " ;
@@ -88,6 +89,8 @@ void print_usage(const string progname)
88
89
cerr << " \n " ;
89
90
}
90
91
92
+ bool verbose = false ;
93
+
91
94
PCM::RawEventConfig initCoreConfig ()
92
95
{
93
96
return PCM::RawEventConfig{ {0 ,0 ,0 ,
@@ -1887,6 +1890,13 @@ int main(int argc, char* argv[])
1887
1890
sampleSeparator = true ;
1888
1891
continue ;
1889
1892
}
1893
+ else if (
1894
+ strncmp (*argv, " -v" , 2 ) == 0 ||
1895
+ strncmp (*argv, " /v" , 2 ) == 0 )
1896
+ {
1897
+ verbose = true ;
1898
+ continue ;
1899
+ }
1890
1900
else if (strncmp (*argv, " --" , 2 ) == 0 )
1891
1901
{
1892
1902
argv++;
@@ -1950,7 +1960,21 @@ int main(int argc, char* argv[])
1950
1960
1951
1961
auto programPMUs = [&m](const PCM::RawPMUConfigs & config)
1952
1962
{
1953
- PCM::ErrorCode status = m->program (config, true );
1963
+ if (verbose)
1964
+ {
1965
+ for (const auto & pmuConfig: config)
1966
+ {
1967
+ for (const auto & e : pmuConfig.second .fixed )
1968
+ {
1969
+ cerr << " Programming " << pmuConfig.first << " fixed event: " << e.second << " \n " ;
1970
+ }
1971
+ for (const auto & e : pmuConfig.second .programmable )
1972
+ {
1973
+ cerr << " Programming " << pmuConfig.first << " programmable event: " << e.second << " \n " ;
1974
+ }
1975
+ }
1976
+ }
1977
+ PCM::ErrorCode status = m->program (config, !verbose);
1954
1978
m->checkError (status);
1955
1979
};
1956
1980
0 commit comments