[Click] Profiling the performance of an element.

Beyers Cronje bcronje at gmail.com
Mon Oct 22 23:04:12 EDT 2007


As long as you dont use STL, RTTI, floating point or exceptions you should
generally be safe to run element code in the kernel module.

See a previous post by Eddie :
https://pdos.csail.mit.edu/pipermail/click/2007-July/006096.html



On 10/23/07, Archit Gupta <archit at cs.wisc.edu> wrote:
>
> Till now, I have tested the code in userlevel click. I am not aware of the
> difficulty in running the code as a kernel module. Is there any difference
> in the element code in userlevel or linux module? Or is it transparent from
> a element writer point of view? I have not used any STL in the c++ code.
>
> Related to performance, I am getting "g++: -pg and -fomit-frame-pointer
> are incompatible" when I try to compile with
> ./configure CFLAGS=-pg CXXFLAGS=-pg CPPFLAGS=-pg
>
> I tried "grepping" for the -fomit-frame-pointer in the distribution
> directory but I couldn't find it :(
> Is there a way to remove an offending flag while configuring?
>
> Sorry for the deluge of the questions.
> Thanks and regards,
>
> Archit
>
> On 10/22/07, Beyers Cronje <bcronje at gmail.com> wrote:
> >
> > One way would be to use:
> >
> > CycleCountAccum<http://www.read.cs.ucla.edu/click/elements/cyclecountaccum> collects
> > differences in cycle counters   PerfCountAccum<http://www.read.cs.ucla.edu/click/elements/perfcountaccum> collects
> > differences in Pentium Pro performance metrics   PerfCountInfo<http://www.read.cs.ucla.edu/click/elements/perfcountinfo> turn
> > on Pentium Pro performance metrics   RoundTripCycleCount<http://www.read.cs.ucla.edu/click/elements/roundtripcyclecount> measures
> > round trip cycles on a push or pull path   SetCycleCount<http://www.read.cs.ucla.edu/click/elements/setcyclecount> stores
> > cycle count in annotation   SetPerfCount<http://www.read.cs.ucla.edu/click/elements/setperfcount> stores
> > Pentium Pro performance metric in annotation
> > See http://www.read.cs.ucla.edu/click/elements#counters
> >
> > These are only available in the linuxmodule package.
> >
> > On 10/23/07, Archit Gupta <archit at cs.wisc.edu> wrote:
> >
> > > Hi,
> > >
> > > I have written an element which processes every packet. I would now
> > > like to profile the performance of the element. I suppose gprof would
> > > be useful here. I would be interested in knowing what tools/techniques
> > >
> > > people use to profile their elements/code.
> > >
> > > Thanks,
> > >
> > > Archit
> > > _______________________________________________
> > > click mailing list
> > > click at amsterdam.lcs.mit.edu
> > > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> > >
> >
> >
>


More information about the click mailing list