-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix various remaining issues with EventDescription Rework, streamline interfaces, move configuration of Events in own EventConfig class. #358
Conversation
2f1196c
to
2e5ef19
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you finally lost me with the naming.
What do the Event instances represent? (And their subclass instances)
What is the difference between EventProvider and EventConfig?
include/lo2s/perf/event_config.hpp
Outdated
void watermark(Event& ev) | ||
{ | ||
ev.set_watermark(0.8 * config().mmap_pages * sysconf(_SC_PAGESIZE)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here? It seems to be not worth a function on its own. Especially because the name is not really telling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this calculation for the watermark at three different spots in the code and I dont want to spread the arcane knowledge that watermark is 80% of config().mmap_pages * page_size all through the code.
Also, I hate inheritance. Why is a SimpleEvent an Extension of an Event? How does one become simple by extending? |
ff348d7
to
a794bbf
Compare
c334748
to
eeee906
Compare
- Move Event class -> EventAttr. - Remove Event configuration code from EventAttr. EventAttrs are just thin wrappers around perf_event_attr now. - The EventAttrs are now composed according to the lo2s invocation by a new EventComposer class. It hides away all the gory details of how to configure perf events correctly. - Merge CounterProvider into EventComposer. - Move EventProvider -> EventResolver. - Move name -> Event resolving code in EventAttr to EventResolver. - Move Topology::base_path variable inside the class method where it is used because the variable did not get initialized at all at class scope. - Improve the way that events only available on a single CPU are shown in --list-events - Warn if syscall/tracepoint recording is requested, but /sys/kernel/debug/tracing is not accessible
eeee906
to
f2f8a0a
Compare
#Move Event Configuration to EventConfig class
Test for debugfs when specifying tracepoint dependent options,
Refactor Event class
Pass TracepointEvent directly instead of name of event
Add definition of base_path into read_proc()