I am going to use some hardware counter functions using libpcp library. The machine I am using is a UltraSPARC T2000 (Niagara) machine, using Open Solaris 11.
The code is: #include <pcplib.h> : int cpc_cpuver; cpc_event_t cpc_event; char *cpc_arg="pic0=IC_miss,pic1=Instr_cnt"; : cpc_cpuver=cpc_getcpuver(); cpc_take_sample(&cpc_event); : This error raise while i am going to compile my code: error: aggregate ‘cpc_event_t event’ has incomplete type and cannot be defined When I add this part manually into my code : typedef struct _cpc_event { int ce_cpuver; hrtime_t ce_hrt; uint64_t ce_tick; uint64_t ce_pic[2]; uint64_t ce_pcr; } cpc_event_t ; then I can compile and run it but still there is a problem. Most of the times cpc_getcpuver() return -1 and so other functions don't work anymore. I guess I am using wrong header file or something like that. Would you please help me to fix it? -- This message posted from opensolaris.org _______________________________________________ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code