Bug 216439

Summary: sqlhist: Implement cast buckets=#
Product: Tools Reporter: Steven Rostedt (rostedt)
Component: Trace-cmd/KernelsharkAssignee: Default virtual assignee for Trace-cmd and kernelshark (tools_tracecmd_kernelshark)
Status: NEW ---    
Severity: normal CC: sameeross1994
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: N/A Subsystem:
Regression: No Bisected commit-id:

Description Steven Rostedt 2022-09-01 21:48:10 UTC
The cast function of sqlhist does not implement .buckets as it does for log2.

That is, one could do:

  sqlhist -e 'select comm,prio,cast(delta as log2) from wakeup_lat'

But not:

  sqlhist -e 'select comm,prio,cast(delta as buckets=10) from wakeup_lat'
Comment 1 sameer 2025-03-23 14:02:35 UTC
Steve,

Could you please let me know, if this is already implemented?. If not i wanted to work on this.

--sameer.
Comment 2 Steven Rostedt 2025-03-23 18:06:51 UTC
Nope, there's a few things I need to fix with sqlhist, but that wasn't one of them (at least that I remember). Feel free to add that.

Note, I've been running behind on my libtracefs work because I've been focusing mostly on the kernel lately. But that should be running down soon so I can get back to the user space tooling.

Thanks!

-- Steve
Comment 3 sameer 2025-03-27 01:36:43 UTC
okay will work on this.