trace-cmd: Extract part of Makefile in utils.mk
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · On Wed, 13 Dec 2017 15:32:35 +0200 Vladislav Valtchev…
Quoted 6 lines · Steven Rostedt
\utils.mk
Quoted 1 line
utils.mk +0
-0I wonder if we should add a
scripts/directory here, to place the built utilities in.
Quoted 5 lines
As you wish. Just 'scripts' seems to me more like a directory containing bash/perl/python scripts. Maybe something like make_utils/make_helpers? I don't know. I'm fine either way. Maybe we should create the directory in case we have more files to put in?
I'm just following what we do in the Linux kernel. It has a directory called "scripts" to help with the build process. As trace-cmd is very tied to the Linux kernel, I want to keep as close to it as possible. Hence, why we are doing all this crazy stuff with make and not any other tool.
-- Steve
Quoted 7 lines · Steven Rostedt
I'm just following what we do in the Linux kernel. It has a directory called "scripts" to help with the build process. As trace-cmd is very tied to the Linux kernel, I want to keep as close to it as possible. Hence, why we are doing all this crazy stuff with make and not any other tool.
Alright. I've already done the change utils.mk -> scripts/utils.mk in my repo.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC PATCH v3 5/9] trace-cmd: Move libparsevent *.c files in lib/pevent
Quoted 8 lines · On Wed, 13 Dec 2017 14:04:19 +0200 Vladislav Valtchev…
Quoted 6 lines
Review
Quoted 4 lines
(quoted diff) +4
-0+ +DEFAULT_TARGET = libparsevent.a + +OBJS =Is the above really necessary?
DEFAULT_TARGETis just a label, I can remove it.
I didn't mean the DEFAULT_TARGET when I said "the above", I was just referring to OBJS, which I now see that could be somewhat ambiguous in what I meant.
Quoted 2 lines
While OBJS = is a "coding style" thing in order to have all the objects added with +=, one per line.
I like the "+=" but do we really need to initialize it to nothing first? Doesn't make work if you just simply remove the "OBJS =" blank line, and a "OBJS += blah" will make OBJS equal to "blah" if OBJS doesn't exist yet.
-- Steve
Quoted 2 lines
How would you like the objects to be listed?
Re: [RFC PATCH v3 5/9] trace-cmd: Move libparsevent *.c files in lib/pevent
Quoted 4 lines · Steven Rostedt
I didn't mean the
DEFAULT_TARGETwhen I said "the above", I was just referring to OBJS, which I now see that could be somewhat ambiguous in what I meant.
Quoted 8 lines
Quoted 2 lines
While OBJS = is a "coding style" thing in order to have all the objects added with +=, one per line.
I like the "+=" but do we really need to initialize it to nothing first? Doesn't make work if you just simply remove the "OBJS =" blank line, and a "OBJS += blah" will make OBJS equal to "blah" if OBJS doesn't exist yet.
OK, by just using OBJS += ... works.
But: it is a dangerous in case the parent file had an OBJS variable exported:
in that case, the variable won't be cleared first and we'll end up with the wrong objects.
I copied the practice of using OBJS = and later OBJS += ... from the original Makefile:
PLUGIN_OBJS =PLUGIN_OBJS += plugin_jbd2.oPLUGIN_OBJS += plugin_hrtimer.oPLUGIN_OBJS += plugin_kmem.oPLUGIN_OBJS += plugin_kvm.oPLUGIN_OBJS += plugin_mac80211.oPLUGIN_OBJS += plugin_sched_switch.oPLUGIN_OBJS += plugin_function.oPLUGIN_OBJS += plugin_xen.oPLUGIN_OBJS += plugin_scsi.oPLUGIN_OBJS += plugin_cfg80211.oPLUGIN_OBJS += plugin_blk.oPLUGIN_OBJS += plugin_tlb.o
Would you like the empty assignment to be removed also from there?
Vlad
Re: [RFC PATCH v3 5/9] trace-cmd: Move libparsevent *.c files in lib/pevent
Quoted 16 lines · On Mon, 18 Dec 2017 17:34:10 +0200 Vladislav Valtchev…
I copied the practice of using OBJS = and later OBJS += ... from the original
Makefile:
PLUGIN_OBJS=PLUGIN_OBJS+= plugin_jbd2.oPLUGIN_OBJS+= plugin_hrtimer.oPLUGIN_OBJS+= plugin_kmem.oPLUGIN_OBJS+= plugin_kvm.oPLUGIN_OBJS+= plugin_mac80211.oPLUGIN_OBJS+= plugin_sched_switch.oPLUGIN_OBJS+= plugin_function.oPLUGIN_OBJS+= plugin_xen.oPLUGIN_OBJS+= plugin_scsi.oPLUGIN_OBJS+= plugin_cfg80211.oPLUGIN_OBJS+= plugin_blk.oPLUGIN_OBJS+= plugin_tlb.o
Quoted 1 line
Would you like the empty assignment to be removed also from there?
Heh, I didn't remember doing that. But I did :-p
This is too minor to debate. Just use the "OBJS =".
Thanks,
-- Steve
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC PATCH v3 9/9] trace-cmd: Move GUI files in kernel-shark/
Quoted 15 lines · On Wed, 13 Dec 2017 15:50:46 +0200 Vladislav Valtchev…
I meant "keeping this might be a problem".
What I had in mind was that in the best case, with the hack in case the parentMakefilechanges (addingconfig_includesand config flags), we'll link useless libraries. In the worst case, different versions of the same library might be used and that will cause and kind of strange build failures.But, I think keeping the hack in that patch makes sense, since the concept of
config_includesandconfig_flagsis fading away in the parentMakefile.
In the next patches of the series also the trace-cmd application will have a separate directory andMakefile, so I could remove those variables from the parentMakefile. It seems fine to me to assume that only the Makefiles of the specific applications can really addconfig_flags(system libraries). The top-levelMakefileshould only orchestrate the others.
Quoted 1 line
Makes sense?
Sure.
-- Steve
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC PATCH v3 0/9] trace-cmd: restructure of the source tree [incomplete]
Quoted 15 lines · On Wed, 13 Dec 2017 15:56:08 +0200 Vladislav Valtchev…
Quoted 5 lines · Steven Rostedt
Hi Vlad,
The patches look decent. I made a few comments, but I think you can send then non RFC next time after incorporating what I suggested.
I'm so happy that you liked them!
Sure, I can make the next iteration non-RFC. Just, I was planning to add also the last 3 patches for:src/plugins
src/trace-cmd/include
src/trace-cmd
Quoted 8 lines
As part of the same series. The alternative is calling this series:
"trace-cmd: restructure of the source tree [part 1]".
and the next one "... [part 2]".
Which do you think is better?
Do it in the next non-RFC patch set. I think you are starting to get the idea of what I want. And there's no reason to have it RFC. The next series may still not be ready to go in, but that's why we have v2, v3, v4... notations ;-)
-- Steve
Re: [RFC PATCH v3 0/9] trace-cmd: restructure of the source tree [incomplete]
Quoted 5 lines · Steven Rostedt
Do it in the next non-RFC patch set. I think you are starting to get the idea of what I want. And there's no reason to have it RFC. The next series may still not be ready to go in, but that's why we have v2, v3, v4... notations ;-)
Sure, no problem. I'm working on it.