File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ int main(int argc, char * argv[])
108
108
cerr << " \n " ;
109
109
110
110
double delay = -1.0 ;
111
+ int pid{ -1 };
111
112
char * sysCmd = NULL ;
112
113
char ** sysArgv = NULL ;
113
114
bool csv = false ;
@@ -116,6 +117,8 @@ int main(int argc, char * argv[])
116
117
117
118
PCM * m = PCM::getInstance ();
118
119
120
+ parsePID (argc, argv, pid);
121
+
119
122
if (argc > 1 ) do
120
123
{
121
124
argv++;
@@ -141,6 +144,12 @@ int main(int argc, char * argv[])
141
144
}
142
145
continue ;
143
146
}
147
+ else if (isPIDOption (argv))
148
+ {
149
+ argv++;
150
+ argc--;
151
+ continue ;
152
+ }
144
153
else if (mainLoop.parseArg (*argv))
145
154
{
146
155
continue ;
@@ -198,7 +207,9 @@ int main(int argc, char * argv[])
198
207
regs[1 ].fields .event_select = m->getOCREventNr (1 , 0 ).first ; // OFFCORE_RESPONSE 1 event
199
208
regs[1 ].fields .umask = m->getOCREventNr (1 , 0 ).second ;
200
209
201
- PCM::ErrorCode status = m->program (PCM::EXT_CUSTOM_CORE_EVENTS, &conf);
210
+ print_pid_collection_message (pid);
211
+
212
+ PCM::ErrorCode status = m->program (PCM::EXT_CUSTOM_CORE_EVENTS, &conf, false , pid);
202
213
m->checkError (status);
203
214
204
215
print_cpu_details ();
You can’t perform that action at this time.
0 commit comments