Re: GSoC Weekly Report #6



Fabien Parent <parent f gmail com> a écrit:

> Hi,

Hey hey.  Sorry for my late reply.

> Last week I worked on using the same dialogs (runprogramdialog &
> proclistdialog) for the the dbg perspective and the profiling
> perspective.

Nice.

> Then I tried to implement the profiling of a running process but I had
> several issues: to profile a running process one need to run perf as
> root, so I used pkexec to start the process as root. The next problem
> came from the fact that the perf.data file generated was only readable
> by the root user so instead of starting perf under pkexec I created a
> shell script starting perf and then chowning the file before quitting.
> This last solution worked great when I was testing the script directly
> from the command line, but when I implemented it in nemiver it didn't
> worked: to stop the profiling of a running process when using perf
> directly from a terminal, CTRL+C (i.e. SIGINT) is enough, but from
> nemiver sending this signal to a root process (pkexec myscript.sh) is
> not possible.
>
> Thus instead of using a shell script to manage perf (starting perf,
> chowning the file, stoping the profiling), I'm thinking of creating an
> exe that will be run by nemiver through pkexec, then nemiver will ask
> this process to stop the profiling (and chown the perf.data file and
> quit) via D-BUS.
>
> What do you think about this solution ? Is there anything simpler I
> missed or may be I doing all wrong ?

Boy.  This seems complicated, I understand your pain.  I am thinking
that for a beginning, you might just run Nemiver as root for this use
case.  Just so you can code the basics (for instance the UI) with peace
of mind.  When you have that code right, then you might indeed code a
"server process" that would be responsible to start/stop perf as root,
using PolicyKit to get the root credentials from the client, and to do
the necessary chowning.

How does that sound to you?

-- 
		Dodji


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]